{
 "cells": [
  {
   "cell_type": "code",
   "execution_count": 1,
   "metadata": {},
   "outputs": [],
   "source": [
    "import numpy as np"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 2,
   "metadata": {},
   "outputs": [],
   "source": [
    "%load_ext cython"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 3,
   "metadata": {},
   "outputs": [],
   "source": [
    "array_1 = np.random.uniform(0, 1000, size=(3000, 2000)).astype(np.intc)\n",
    "array_2 = np.random.uniform(0, 1000, size=(3000, 2000)).astype(np.intc)\n",
    "a = 4\n",
    "b = 3\n",
    "c = 9"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 4,
   "metadata": {},
   "outputs": [],
   "source": [
    "def compute_np(array_1, array_2, a, b, c):\n",
    "    return np.clip(array_1, 2, 10) * a + array_2 * b + c"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 5,
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "28.7 ms ± 1.33 ms per loop (mean ± std. dev. of 7 runs, 10 loops each)\n"
     ]
    }
   ],
   "source": [
    "%timeit compute_np(array_1, array_2, a, b, c)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 6,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/html": [
       "<!DOCTYPE html>\n",
       "<!-- Generated by Cython 0.29.14 -->\n",
       "<html>\n",
       "<head>\n",
       "    <meta http-equiv=\"Content-Type\" content=\"text/html; charset=utf-8\" />\n",
       "    <title>Cython: _cython_magic_749e2f06f11f9a32dbdfa8eae1a17ea3.pyx</title>\n",
       "    <style type=\"text/css\">\n",
       "    \n",
       "body.cython { font-family: courier; font-size: 12; }\n",
       "\n",
       ".cython.tag  {  }\n",
       ".cython.line { margin: 0em }\n",
       ".cython.code { font-size: 9; color: #444444; display: none; margin: 0px 0px 0px 8px; border-left: 8px none; }\n",
       "\n",
       ".cython.line .run { background-color: #B0FFB0; }\n",
       ".cython.line .mis { background-color: #FFB0B0; }\n",
       ".cython.code.run  { border-left: 8px solid #B0FFB0; }\n",
       ".cython.code.mis  { border-left: 8px solid #FFB0B0; }\n",
       "\n",
       ".cython.code .py_c_api  { color: red; }\n",
       ".cython.code .py_macro_api  { color: #FF7000; }\n",
       ".cython.code .pyx_c_api  { color: #FF3000; }\n",
       ".cython.code .pyx_macro_api  { color: #FF7000; }\n",
       ".cython.code .refnanny  { color: #FFA000; }\n",
       ".cython.code .trace  { color: #FFA000; }\n",
       ".cython.code .error_goto  { color: #FFA000; }\n",
       "\n",
       ".cython.code .coerce  { color: #008000; border: 1px dotted #008000 }\n",
       ".cython.code .py_attr { color: #FF0000; font-weight: bold; }\n",
       ".cython.code .c_attr  { color: #0000FF; }\n",
       ".cython.code .py_call { color: #FF0000; font-weight: bold; }\n",
       ".cython.code .c_call  { color: #0000FF; }\n",
       "\n",
       ".cython.score-0 {background-color: #FFFFff;}\n",
       ".cython.score-1 {background-color: #FFFFe7;}\n",
       ".cython.score-2 {background-color: #FFFFd4;}\n",
       ".cython.score-3 {background-color: #FFFFc4;}\n",
       ".cython.score-4 {background-color: #FFFFb6;}\n",
       ".cython.score-5 {background-color: #FFFFaa;}\n",
       ".cython.score-6 {background-color: #FFFF9f;}\n",
       ".cython.score-7 {background-color: #FFFF96;}\n",
       ".cython.score-8 {background-color: #FFFF8d;}\n",
       ".cython.score-9 {background-color: #FFFF86;}\n",
       ".cython.score-10 {background-color: #FFFF7f;}\n",
       ".cython.score-11 {background-color: #FFFF79;}\n",
       ".cython.score-12 {background-color: #FFFF73;}\n",
       ".cython.score-13 {background-color: #FFFF6e;}\n",
       ".cython.score-14 {background-color: #FFFF6a;}\n",
       ".cython.score-15 {background-color: #FFFF66;}\n",
       ".cython.score-16 {background-color: #FFFF62;}\n",
       ".cython.score-17 {background-color: #FFFF5e;}\n",
       ".cython.score-18 {background-color: #FFFF5b;}\n",
       ".cython.score-19 {background-color: #FFFF57;}\n",
       ".cython.score-20 {background-color: #FFFF55;}\n",
       ".cython.score-21 {background-color: #FFFF52;}\n",
       ".cython.score-22 {background-color: #FFFF4f;}\n",
       ".cython.score-23 {background-color: #FFFF4d;}\n",
       ".cython.score-24 {background-color: #FFFF4b;}\n",
       ".cython.score-25 {background-color: #FFFF48;}\n",
       ".cython.score-26 {background-color: #FFFF46;}\n",
       ".cython.score-27 {background-color: #FFFF44;}\n",
       ".cython.score-28 {background-color: #FFFF43;}\n",
       ".cython.score-29 {background-color: #FFFF41;}\n",
       ".cython.score-30 {background-color: #FFFF3f;}\n",
       ".cython.score-31 {background-color: #FFFF3e;}\n",
       ".cython.score-32 {background-color: #FFFF3c;}\n",
       ".cython.score-33 {background-color: #FFFF3b;}\n",
       ".cython.score-34 {background-color: #FFFF39;}\n",
       ".cython.score-35 {background-color: #FFFF38;}\n",
       ".cython.score-36 {background-color: #FFFF37;}\n",
       ".cython.score-37 {background-color: #FFFF36;}\n",
       ".cython.score-38 {background-color: #FFFF35;}\n",
       ".cython.score-39 {background-color: #FFFF34;}\n",
       ".cython.score-40 {background-color: #FFFF33;}\n",
       ".cython.score-41 {background-color: #FFFF32;}\n",
       ".cython.score-42 {background-color: #FFFF31;}\n",
       ".cython.score-43 {background-color: #FFFF30;}\n",
       ".cython.score-44 {background-color: #FFFF2f;}\n",
       ".cython.score-45 {background-color: #FFFF2e;}\n",
       ".cython.score-46 {background-color: #FFFF2d;}\n",
       ".cython.score-47 {background-color: #FFFF2c;}\n",
       ".cython.score-48 {background-color: #FFFF2b;}\n",
       ".cython.score-49 {background-color: #FFFF2b;}\n",
       ".cython.score-50 {background-color: #FFFF2a;}\n",
       ".cython.score-51 {background-color: #FFFF29;}\n",
       ".cython.score-52 {background-color: #FFFF29;}\n",
       ".cython.score-53 {background-color: #FFFF28;}\n",
       ".cython.score-54 {background-color: #FFFF27;}\n",
       ".cython.score-55 {background-color: #FFFF27;}\n",
       ".cython.score-56 {background-color: #FFFF26;}\n",
       ".cython.score-57 {background-color: #FFFF26;}\n",
       ".cython.score-58 {background-color: #FFFF25;}\n",
       ".cython.score-59 {background-color: #FFFF24;}\n",
       ".cython.score-60 {background-color: #FFFF24;}\n",
       ".cython.score-61 {background-color: #FFFF23;}\n",
       ".cython.score-62 {background-color: #FFFF23;}\n",
       ".cython.score-63 {background-color: #FFFF22;}\n",
       ".cython.score-64 {background-color: #FFFF22;}\n",
       ".cython.score-65 {background-color: #FFFF22;}\n",
       ".cython.score-66 {background-color: #FFFF21;}\n",
       ".cython.score-67 {background-color: #FFFF21;}\n",
       ".cython.score-68 {background-color: #FFFF20;}\n",
       ".cython.score-69 {background-color: #FFFF20;}\n",
       ".cython.score-70 {background-color: #FFFF1f;}\n",
       ".cython.score-71 {background-color: #FFFF1f;}\n",
       ".cython.score-72 {background-color: #FFFF1f;}\n",
       ".cython.score-73 {background-color: #FFFF1e;}\n",
       ".cython.score-74 {background-color: #FFFF1e;}\n",
       ".cython.score-75 {background-color: #FFFF1e;}\n",
       ".cython.score-76 {background-color: #FFFF1d;}\n",
       ".cython.score-77 {background-color: #FFFF1d;}\n",
       ".cython.score-78 {background-color: #FFFF1c;}\n",
       ".cython.score-79 {background-color: #FFFF1c;}\n",
       ".cython.score-80 {background-color: #FFFF1c;}\n",
       ".cython.score-81 {background-color: #FFFF1c;}\n",
       ".cython.score-82 {background-color: #FFFF1b;}\n",
       ".cython.score-83 {background-color: #FFFF1b;}\n",
       ".cython.score-84 {background-color: #FFFF1b;}\n",
       ".cython.score-85 {background-color: #FFFF1a;}\n",
       ".cython.score-86 {background-color: #FFFF1a;}\n",
       ".cython.score-87 {background-color: #FFFF1a;}\n",
       ".cython.score-88 {background-color: #FFFF1a;}\n",
       ".cython.score-89 {background-color: #FFFF19;}\n",
       ".cython.score-90 {background-color: #FFFF19;}\n",
       ".cython.score-91 {background-color: #FFFF19;}\n",
       ".cython.score-92 {background-color: #FFFF19;}\n",
       ".cython.score-93 {background-color: #FFFF18;}\n",
       ".cython.score-94 {background-color: #FFFF18;}\n",
       ".cython.score-95 {background-color: #FFFF18;}\n",
       ".cython.score-96 {background-color: #FFFF18;}\n",
       ".cython.score-97 {background-color: #FFFF17;}\n",
       ".cython.score-98 {background-color: #FFFF17;}\n",
       ".cython.score-99 {background-color: #FFFF17;}\n",
       ".cython.score-100 {background-color: #FFFF17;}\n",
       ".cython.score-101 {background-color: #FFFF16;}\n",
       ".cython.score-102 {background-color: #FFFF16;}\n",
       ".cython.score-103 {background-color: #FFFF16;}\n",
       ".cython.score-104 {background-color: #FFFF16;}\n",
       ".cython.score-105 {background-color: #FFFF16;}\n",
       ".cython.score-106 {background-color: #FFFF15;}\n",
       ".cython.score-107 {background-color: #FFFF15;}\n",
       ".cython.score-108 {background-color: #FFFF15;}\n",
       ".cython.score-109 {background-color: #FFFF15;}\n",
       ".cython.score-110 {background-color: #FFFF15;}\n",
       ".cython.score-111 {background-color: #FFFF15;}\n",
       ".cython.score-112 {background-color: #FFFF14;}\n",
       ".cython.score-113 {background-color: #FFFF14;}\n",
       ".cython.score-114 {background-color: #FFFF14;}\n",
       ".cython.score-115 {background-color: #FFFF14;}\n",
       ".cython.score-116 {background-color: #FFFF14;}\n",
       ".cython.score-117 {background-color: #FFFF14;}\n",
       ".cython.score-118 {background-color: #FFFF13;}\n",
       ".cython.score-119 {background-color: #FFFF13;}\n",
       ".cython.score-120 {background-color: #FFFF13;}\n",
       ".cython.score-121 {background-color: #FFFF13;}\n",
       ".cython.score-122 {background-color: #FFFF13;}\n",
       ".cython.score-123 {background-color: #FFFF13;}\n",
       ".cython.score-124 {background-color: #FFFF13;}\n",
       ".cython.score-125 {background-color: #FFFF12;}\n",
       ".cython.score-126 {background-color: #FFFF12;}\n",
       ".cython.score-127 {background-color: #FFFF12;}\n",
       ".cython.score-128 {background-color: #FFFF12;}\n",
       ".cython.score-129 {background-color: #FFFF12;}\n",
       ".cython.score-130 {background-color: #FFFF12;}\n",
       ".cython.score-131 {background-color: #FFFF12;}\n",
       ".cython.score-132 {background-color: #FFFF11;}\n",
       ".cython.score-133 {background-color: #FFFF11;}\n",
       ".cython.score-134 {background-color: #FFFF11;}\n",
       ".cython.score-135 {background-color: #FFFF11;}\n",
       ".cython.score-136 {background-color: #FFFF11;}\n",
       ".cython.score-137 {background-color: #FFFF11;}\n",
       ".cython.score-138 {background-color: #FFFF11;}\n",
       ".cython.score-139 {background-color: #FFFF11;}\n",
       ".cython.score-140 {background-color: #FFFF11;}\n",
       ".cython.score-141 {background-color: #FFFF10;}\n",
       ".cython.score-142 {background-color: #FFFF10;}\n",
       ".cython.score-143 {background-color: #FFFF10;}\n",
       ".cython.score-144 {background-color: #FFFF10;}\n",
       ".cython.score-145 {background-color: #FFFF10;}\n",
       ".cython.score-146 {background-color: #FFFF10;}\n",
       ".cython.score-147 {background-color: #FFFF10;}\n",
       ".cython.score-148 {background-color: #FFFF10;}\n",
       ".cython.score-149 {background-color: #FFFF10;}\n",
       ".cython.score-150 {background-color: #FFFF0f;}\n",
       ".cython.score-151 {background-color: #FFFF0f;}\n",
       ".cython.score-152 {background-color: #FFFF0f;}\n",
       ".cython.score-153 {background-color: #FFFF0f;}\n",
       ".cython.score-154 {background-color: #FFFF0f;}\n",
       ".cython.score-155 {background-color: #FFFF0f;}\n",
       ".cython.score-156 {background-color: #FFFF0f;}\n",
       ".cython.score-157 {background-color: #FFFF0f;}\n",
       ".cython.score-158 {background-color: #FFFF0f;}\n",
       ".cython.score-159 {background-color: #FFFF0f;}\n",
       ".cython.score-160 {background-color: #FFFF0f;}\n",
       ".cython.score-161 {background-color: #FFFF0e;}\n",
       ".cython.score-162 {background-color: #FFFF0e;}\n",
       ".cython.score-163 {background-color: #FFFF0e;}\n",
       ".cython.score-164 {background-color: #FFFF0e;}\n",
       ".cython.score-165 {background-color: #FFFF0e;}\n",
       ".cython.score-166 {background-color: #FFFF0e;}\n",
       ".cython.score-167 {background-color: #FFFF0e;}\n",
       ".cython.score-168 {background-color: #FFFF0e;}\n",
       ".cython.score-169 {background-color: #FFFF0e;}\n",
       ".cython.score-170 {background-color: #FFFF0e;}\n",
       ".cython.score-171 {background-color: #FFFF0e;}\n",
       ".cython.score-172 {background-color: #FFFF0e;}\n",
       ".cython.score-173 {background-color: #FFFF0d;}\n",
       ".cython.score-174 {background-color: #FFFF0d;}\n",
       ".cython.score-175 {background-color: #FFFF0d;}\n",
       ".cython.score-176 {background-color: #FFFF0d;}\n",
       ".cython.score-177 {background-color: #FFFF0d;}\n",
       ".cython.score-178 {background-color: #FFFF0d;}\n",
       ".cython.score-179 {background-color: #FFFF0d;}\n",
       ".cython.score-180 {background-color: #FFFF0d;}\n",
       ".cython.score-181 {background-color: #FFFF0d;}\n",
       ".cython.score-182 {background-color: #FFFF0d;}\n",
       ".cython.score-183 {background-color: #FFFF0d;}\n",
       ".cython.score-184 {background-color: #FFFF0d;}\n",
       ".cython.score-185 {background-color: #FFFF0d;}\n",
       ".cython.score-186 {background-color: #FFFF0d;}\n",
       ".cython.score-187 {background-color: #FFFF0c;}\n",
       ".cython.score-188 {background-color: #FFFF0c;}\n",
       ".cython.score-189 {background-color: #FFFF0c;}\n",
       ".cython.score-190 {background-color: #FFFF0c;}\n",
       ".cython.score-191 {background-color: #FFFF0c;}\n",
       ".cython.score-192 {background-color: #FFFF0c;}\n",
       ".cython.score-193 {background-color: #FFFF0c;}\n",
       ".cython.score-194 {background-color: #FFFF0c;}\n",
       ".cython.score-195 {background-color: #FFFF0c;}\n",
       ".cython.score-196 {background-color: #FFFF0c;}\n",
       ".cython.score-197 {background-color: #FFFF0c;}\n",
       ".cython.score-198 {background-color: #FFFF0c;}\n",
       ".cython.score-199 {background-color: #FFFF0c;}\n",
       ".cython.score-200 {background-color: #FFFF0c;}\n",
       ".cython.score-201 {background-color: #FFFF0c;}\n",
       ".cython.score-202 {background-color: #FFFF0c;}\n",
       ".cython.score-203 {background-color: #FFFF0b;}\n",
       ".cython.score-204 {background-color: #FFFF0b;}\n",
       ".cython.score-205 {background-color: #FFFF0b;}\n",
       ".cython.score-206 {background-color: #FFFF0b;}\n",
       ".cython.score-207 {background-color: #FFFF0b;}\n",
       ".cython.score-208 {background-color: #FFFF0b;}\n",
       ".cython.score-209 {background-color: #FFFF0b;}\n",
       ".cython.score-210 {background-color: #FFFF0b;}\n",
       ".cython.score-211 {background-color: #FFFF0b;}\n",
       ".cython.score-212 {background-color: #FFFF0b;}\n",
       ".cython.score-213 {background-color: #FFFF0b;}\n",
       ".cython.score-214 {background-color: #FFFF0b;}\n",
       ".cython.score-215 {background-color: #FFFF0b;}\n",
       ".cython.score-216 {background-color: #FFFF0b;}\n",
       ".cython.score-217 {background-color: #FFFF0b;}\n",
       ".cython.score-218 {background-color: #FFFF0b;}\n",
       ".cython.score-219 {background-color: #FFFF0b;}\n",
       ".cython.score-220 {background-color: #FFFF0b;}\n",
       ".cython.score-221 {background-color: #FFFF0b;}\n",
       ".cython.score-222 {background-color: #FFFF0a;}\n",
       ".cython.score-223 {background-color: #FFFF0a;}\n",
       ".cython.score-224 {background-color: #FFFF0a;}\n",
       ".cython.score-225 {background-color: #FFFF0a;}\n",
       ".cython.score-226 {background-color: #FFFF0a;}\n",
       ".cython.score-227 {background-color: #FFFF0a;}\n",
       ".cython.score-228 {background-color: #FFFF0a;}\n",
       ".cython.score-229 {background-color: #FFFF0a;}\n",
       ".cython.score-230 {background-color: #FFFF0a;}\n",
       ".cython.score-231 {background-color: #FFFF0a;}\n",
       ".cython.score-232 {background-color: #FFFF0a;}\n",
       ".cython.score-233 {background-color: #FFFF0a;}\n",
       ".cython.score-234 {background-color: #FFFF0a;}\n",
       ".cython.score-235 {background-color: #FFFF0a;}\n",
       ".cython.score-236 {background-color: #FFFF0a;}\n",
       ".cython.score-237 {background-color: #FFFF0a;}\n",
       ".cython.score-238 {background-color: #FFFF0a;}\n",
       ".cython.score-239 {background-color: #FFFF0a;}\n",
       ".cython.score-240 {background-color: #FFFF0a;}\n",
       ".cython.score-241 {background-color: #FFFF0a;}\n",
       ".cython.score-242 {background-color: #FFFF0a;}\n",
       ".cython.score-243 {background-color: #FFFF0a;}\n",
       ".cython.score-244 {background-color: #FFFF0a;}\n",
       ".cython.score-245 {background-color: #FFFF0a;}\n",
       ".cython.score-246 {background-color: #FFFF09;}\n",
       ".cython.score-247 {background-color: #FFFF09;}\n",
       ".cython.score-248 {background-color: #FFFF09;}\n",
       ".cython.score-249 {background-color: #FFFF09;}\n",
       ".cython.score-250 {background-color: #FFFF09;}\n",
       ".cython.score-251 {background-color: #FFFF09;}\n",
       ".cython.score-252 {background-color: #FFFF09;}\n",
       ".cython.score-253 {background-color: #FFFF09;}\n",
       ".cython.score-254 {background-color: #FFFF09;}\n",
       ".cython .hll { background-color: #ffffcc }\n",
       ".cython  { background: #f8f8f8; }\n",
       ".cython .c { color: #408080; font-style: italic } /* Comment */\n",
       ".cython .err { border: 1px solid #FF0000 } /* Error */\n",
       ".cython .k { color: #008000; font-weight: bold } /* Keyword */\n",
       ".cython .o { color: #666666 } /* Operator */\n",
       ".cython .ch { color: #408080; font-style: italic } /* Comment.Hashbang */\n",
       ".cython .cm { color: #408080; font-style: italic } /* Comment.Multiline */\n",
       ".cython .cp { color: #BC7A00 } /* Comment.Preproc */\n",
       ".cython .cpf { color: #408080; font-style: italic } /* Comment.PreprocFile */\n",
       ".cython .c1 { color: #408080; font-style: italic } /* Comment.Single */\n",
       ".cython .cs { color: #408080; font-style: italic } /* Comment.Special */\n",
       ".cython .gd { color: #A00000 } /* Generic.Deleted */\n",
       ".cython .ge { font-style: italic } /* Generic.Emph */\n",
       ".cython .gr { color: #FF0000 } /* Generic.Error */\n",
       ".cython .gh { color: #000080; font-weight: bold } /* Generic.Heading */\n",
       ".cython .gi { color: #00A000 } /* Generic.Inserted */\n",
       ".cython .go { color: #888888 } /* Generic.Output */\n",
       ".cython .gp { color: #000080; font-weight: bold } /* Generic.Prompt */\n",
       ".cython .gs { font-weight: bold } /* Generic.Strong */\n",
       ".cython .gu { color: #800080; font-weight: bold } /* Generic.Subheading */\n",
       ".cython .gt { color: #0044DD } /* Generic.Traceback */\n",
       ".cython .kc { color: #008000; font-weight: bold } /* Keyword.Constant */\n",
       ".cython .kd { color: #008000; font-weight: bold } /* Keyword.Declaration */\n",
       ".cython .kn { color: #008000; font-weight: bold } /* Keyword.Namespace */\n",
       ".cython .kp { color: #008000 } /* Keyword.Pseudo */\n",
       ".cython .kr { color: #008000; font-weight: bold } /* Keyword.Reserved */\n",
       ".cython .kt { color: #B00040 } /* Keyword.Type */\n",
       ".cython .m { color: #666666 } /* Literal.Number */\n",
       ".cython .s { color: #BA2121 } /* Literal.String */\n",
       ".cython .na { color: #7D9029 } /* Name.Attribute */\n",
       ".cython .nb { color: #008000 } /* Name.Builtin */\n",
       ".cython .nc { color: #0000FF; font-weight: bold } /* Name.Class */\n",
       ".cython .no { color: #880000 } /* Name.Constant */\n",
       ".cython .nd { color: #AA22FF } /* Name.Decorator */\n",
       ".cython .ni { color: #999999; font-weight: bold } /* Name.Entity */\n",
       ".cython .ne { color: #D2413A; font-weight: bold } /* Name.Exception */\n",
       ".cython .nf { color: #0000FF } /* Name.Function */\n",
       ".cython .nl { color: #A0A000 } /* Name.Label */\n",
       ".cython .nn { color: #0000FF; font-weight: bold } /* Name.Namespace */\n",
       ".cython .nt { color: #008000; font-weight: bold } /* Name.Tag */\n",
       ".cython .nv { color: #19177C } /* Name.Variable */\n",
       ".cython .ow { color: #AA22FF; font-weight: bold } /* Operator.Word */\n",
       ".cython .w { color: #bbbbbb } /* Text.Whitespace */\n",
       ".cython .mb { color: #666666 } /* Literal.Number.Bin */\n",
       ".cython .mf { color: #666666 } /* Literal.Number.Float */\n",
       ".cython .mh { color: #666666 } /* Literal.Number.Hex */\n",
       ".cython .mi { color: #666666 } /* Literal.Number.Integer */\n",
       ".cython .mo { color: #666666 } /* Literal.Number.Oct */\n",
       ".cython .sa { color: #BA2121 } /* Literal.String.Affix */\n",
       ".cython .sb { color: #BA2121 } /* Literal.String.Backtick */\n",
       ".cython .sc { color: #BA2121 } /* Literal.String.Char */\n",
       ".cython .dl { color: #BA2121 } /* Literal.String.Delimiter */\n",
       ".cython .sd { color: #BA2121; font-style: italic } /* Literal.String.Doc */\n",
       ".cython .s2 { color: #BA2121 } /* Literal.String.Double */\n",
       ".cython .se { color: #BB6622; font-weight: bold } /* Literal.String.Escape */\n",
       ".cython .sh { color: #BA2121 } /* Literal.String.Heredoc */\n",
       ".cython .si { color: #BB6688; font-weight: bold } /* Literal.String.Interpol */\n",
       ".cython .sx { color: #008000 } /* Literal.String.Other */\n",
       ".cython .sr { color: #BB6688 } /* Literal.String.Regex */\n",
       ".cython .s1 { color: #BA2121 } /* Literal.String.Single */\n",
       ".cython .ss { color: #19177C } /* Literal.String.Symbol */\n",
       ".cython .bp { color: #008000 } /* Name.Builtin.Pseudo */\n",
       ".cython .fm { color: #0000FF } /* Name.Function.Magic */\n",
       ".cython .vc { color: #19177C } /* Name.Variable.Class */\n",
       ".cython .vg { color: #19177C } /* Name.Variable.Global */\n",
       ".cython .vi { color: #19177C } /* Name.Variable.Instance */\n",
       ".cython .vm { color: #19177C } /* Name.Variable.Magic */\n",
       ".cython .il { color: #666666 } /* Literal.Number.Integer.Long */\n",
       "    </style>\n",
       "</head>\n",
       "<body class=\"cython\">\n",
       "<p><span style=\"border-bottom: solid 1px grey;\">Generated by Cython 0.29.14</span></p>\n",
       "<p>\n",
       "    <span style=\"background-color: #FFFF00\">Yellow lines</span> hint at Python interaction.<br />\n",
       "    Click on a line that starts with a \"<code>+</code>\" to see the C code that Cython generated for it.\n",
       "</p>\n",
       "<div class=\"cython\"><pre class=\"cython line score-0\">&#xA0;<span class=\"\">01</span>: </pre>\n",
       "<pre class=\"cython line score-16\" onclick=\"(function(s){s.display=s.display==='block'?'none':'block'})(this.nextElementSibling.style)\">+<span class=\"\">02</span>: <span class=\"k\">import</span> <span class=\"nn\">numpy</span> <span class=\"k\">as</span> <span class=\"nn\">np</span></pre>\n",
       "<pre class='cython code score-16 '>  __pyx_t_1 = <span class='pyx_c_api'>__Pyx_Import</span>(__pyx_n_s_numpy, 0, 0);<span class='error_goto'> if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2, __pyx_L1_error)</span>\n",
       "  <span class='refnanny'>__Pyx_GOTREF</span>(__pyx_t_1);\n",
       "  if (<span class='py_c_api'>PyDict_SetItem</span>(__pyx_d, __pyx_n_s_np, __pyx_t_1) &lt; 0) <span class='error_goto'>__PYX_ERR(0, 2, __pyx_L1_error)</span>\n",
       "  <span class='pyx_macro_api'>__Pyx_DECREF</span>(__pyx_t_1); __pyx_t_1 = 0;\n",
       "/* … */\n",
       "  __pyx_t_3 = <span class='pyx_c_api'>__Pyx_PyDict_NewPresized</span>(0);<span class='error_goto'> if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2, __pyx_L1_error)</span>\n",
       "  <span class='refnanny'>__Pyx_GOTREF</span>(__pyx_t_3);\n",
       "  if (<span class='py_c_api'>PyDict_SetItem</span>(__pyx_d, __pyx_n_s_test, __pyx_t_3) &lt; 0) <span class='error_goto'>__PYX_ERR(0, 2, __pyx_L1_error)</span>\n",
       "  <span class='pyx_macro_api'>__Pyx_DECREF</span>(__pyx_t_3); __pyx_t_3 = 0;\n",
       "</pre><pre class=\"cython line score-0\">&#xA0;<span class=\"\">03</span>: <span class=\"k\">cimport</span> <span class=\"nn\">cython</span></pre>\n",
       "<pre class=\"cython line score-0\">&#xA0;<span class=\"\">04</span>: </pre>\n",
       "<pre class=\"cython line score-0\">&#xA0;<span class=\"\">05</span>: <span class=\"k\">ctypedef</span> <span class=\"k\">fused</span> <span class=\"n\">scalar_t</span><span class=\"p\">:</span></pre>\n",
       "<pre class=\"cython line score-0\">&#xA0;<span class=\"\">06</span>:     <span class=\"nb\">int</span></pre>\n",
       "<pre class=\"cython line score-0\">&#xA0;<span class=\"\">07</span>:     <span class=\"nb\">float</span></pre>\n",
       "<pre class=\"cython line score-0\">&#xA0;<span class=\"\">08</span>:     <span class=\"n\">double</span></pre>\n",
       "<pre class=\"cython line score-0\">&#xA0;<span class=\"\">09</span>: </pre>\n",
       "<pre class=\"cython line score-0\" onclick=\"(function(s){s.display=s.display==='block'?'none':'block'})(this.nextElementSibling.style)\">+<span class=\"\">10</span>: <span class=\"k\">cdef</span> <span class=\"kt\">scalar_t</span> <span class=\"nf\">clip</span><span class=\"p\">(</span><span class=\"n\">scalar_t</span> <span class=\"n\">a</span><span class=\"p\">,</span> <span class=\"n\">scalar_t</span> <span class=\"n\">min_value</span><span class=\"p\">,</span> <span class=\"n\">scalar_t</span> <span class=\"n\">max_value</span><span class=\"p\">):</span></pre>\n",
       "<pre class='cython code score-0 '>static int __pyx_fuse_0__pyx_f_46_cython_magic_749e2f06f11f9a32dbdfa8eae1a17ea3_clip(int __pyx_v_a, int __pyx_v_min_value, int __pyx_v_max_value) {\n",
       "  int __pyx_r;\n",
       "  <span class='refnanny'>__Pyx_RefNannyDeclarations</span>\n",
       "  <span class='refnanny'>__Pyx_RefNannySetupContext</span>(\"__pyx_fuse_0clip\", 0);\n",
       "/* … */\n",
       "  /* function exit code */\n",
       "  __pyx_L0:;\n",
       "  <span class='refnanny'>__Pyx_RefNannyFinishContext</span>();\n",
       "  return __pyx_r;\n",
       "}\n",
       "\n",
       "static float __pyx_fuse_1__pyx_f_46_cython_magic_749e2f06f11f9a32dbdfa8eae1a17ea3_clip(float __pyx_v_a, float __pyx_v_min_value, float __pyx_v_max_value) {\n",
       "  float __pyx_r;\n",
       "  <span class='refnanny'>__Pyx_RefNannyDeclarations</span>\n",
       "  <span class='refnanny'>__Pyx_RefNannySetupContext</span>(\"__pyx_fuse_1clip\", 0);\n",
       "/* … */\n",
       "  /* function exit code */\n",
       "  __pyx_L0:;\n",
       "  <span class='refnanny'>__Pyx_RefNannyFinishContext</span>();\n",
       "  return __pyx_r;\n",
       "}\n",
       "\n",
       "static double __pyx_fuse_2__pyx_f_46_cython_magic_749e2f06f11f9a32dbdfa8eae1a17ea3_clip(double __pyx_v_a, double __pyx_v_min_value, double __pyx_v_max_value) {\n",
       "  double __pyx_r;\n",
       "  <span class='refnanny'>__Pyx_RefNannyDeclarations</span>\n",
       "  <span class='refnanny'>__Pyx_RefNannySetupContext</span>(\"__pyx_fuse_2clip\", 0);\n",
       "/* … */\n",
       "  /* function exit code */\n",
       "  __pyx_L0:;\n",
       "  <span class='refnanny'>__Pyx_RefNannyFinishContext</span>();\n",
       "  return __pyx_r;\n",
       "}\n",
       "</pre><pre class=\"cython line score-0\" onclick=\"(function(s){s.display=s.display==='block'?'none':'block'})(this.nextElementSibling.style)\">+<span class=\"\">11</span>:     <span class=\"k\">return</span> <span class=\"nb\">min</span><span class=\"p\">(</span><span class=\"nb\">max</span><span class=\"p\">(</span><span class=\"n\">a</span><span class=\"p\">,</span> <span class=\"n\">min_value</span><span class=\"p\">),</span> <span class=\"n\">max_value</span><span class=\"p\">)</span></pre>\n",
       "<pre class='cython code score-0 '>  __pyx_t_1 = __pyx_v_max_value;\n",
       "  __pyx_t_2 = __pyx_v_min_value;\n",
       "  __pyx_t_3 = __pyx_v_a;\n",
       "  if (((__pyx_t_2 &gt; __pyx_t_3) != 0)) {\n",
       "    __pyx_t_4 = __pyx_t_2;\n",
       "  } else {\n",
       "    __pyx_t_4 = __pyx_t_3;\n",
       "  }\n",
       "  __pyx_t_2 = __pyx_t_4;\n",
       "  if (((__pyx_t_1 &lt; __pyx_t_2) != 0)) {\n",
       "    __pyx_t_4 = __pyx_t_1;\n",
       "  } else {\n",
       "    __pyx_t_4 = __pyx_t_2;\n",
       "  }\n",
       "  __pyx_r = __pyx_t_4;\n",
       "  goto __pyx_L0;\n",
       "/* … */\n",
       "  __pyx_t_1 = __pyx_v_max_value;\n",
       "  __pyx_t_2 = __pyx_v_min_value;\n",
       "  __pyx_t_3 = __pyx_v_a;\n",
       "  if (((__pyx_t_2 &gt; __pyx_t_3) != 0)) {\n",
       "    __pyx_t_4 = __pyx_t_2;\n",
       "  } else {\n",
       "    __pyx_t_4 = __pyx_t_3;\n",
       "  }\n",
       "  __pyx_t_2 = __pyx_t_4;\n",
       "  if (((__pyx_t_1 &lt; __pyx_t_2) != 0)) {\n",
       "    __pyx_t_4 = __pyx_t_1;\n",
       "  } else {\n",
       "    __pyx_t_4 = __pyx_t_2;\n",
       "  }\n",
       "  __pyx_r = __pyx_t_4;\n",
       "  goto __pyx_L0;\n",
       "/* … */\n",
       "  __pyx_t_1 = __pyx_v_max_value;\n",
       "  __pyx_t_2 = __pyx_v_min_value;\n",
       "  __pyx_t_3 = __pyx_v_a;\n",
       "  if (((__pyx_t_2 &gt; __pyx_t_3) != 0)) {\n",
       "    __pyx_t_4 = __pyx_t_2;\n",
       "  } else {\n",
       "    __pyx_t_4 = __pyx_t_3;\n",
       "  }\n",
       "  __pyx_t_2 = __pyx_t_4;\n",
       "  if (((__pyx_t_1 &lt; __pyx_t_2) != 0)) {\n",
       "    __pyx_t_4 = __pyx_t_1;\n",
       "  } else {\n",
       "    __pyx_t_4 = __pyx_t_2;\n",
       "  }\n",
       "  __pyx_r = __pyx_t_4;\n",
       "  goto __pyx_L0;\n",
       "</pre><pre class=\"cython line score-0\">&#xA0;<span class=\"\">12</span>: </pre>\n",
       "<pre class=\"cython line score-0\">&#xA0;<span class=\"\">13</span>: <span class=\"nd\">@cython</span><span class=\"o\">.</span><span class=\"n\">boundscheck</span><span class=\"p\">(</span><span class=\"bp\">False</span><span class=\"p\">)</span></pre>\n",
       "<pre class=\"cython line score-0\">&#xA0;<span class=\"\">14</span>: <span class=\"nd\">@cython</span><span class=\"o\">.</span><span class=\"n\">wraparound</span><span class=\"p\">(</span><span class=\"bp\">False</span><span class=\"p\">)</span></pre>\n",
       "<pre class=\"cython line score-595\" onclick=\"(function(s){s.display=s.display==='block'?'none':'block'})(this.nextElementSibling.style)\">+<span class=\"\">15</span>: <span class=\"k\">def</span> <span class=\"nf\">compute</span><span class=\"p\">(</span><span class=\"n\">scalar_t</span><span class=\"p\">[:,</span> <span class=\"p\">::</span><span class=\"mf\">1</span><span class=\"p\">]</span> <span class=\"n\">array_1</span><span class=\"p\">,</span> <span class=\"n\">scalar_t</span><span class=\"p\">[:,</span> <span class=\"p\">::</span><span class=\"mf\">1</span><span class=\"p\">]</span> <span class=\"n\">array_2</span><span class=\"p\">,</span> <span class=\"n\">scalar_t</span> <span class=\"n\">a</span><span class=\"p\">,</span> <span class=\"n\">scalar_t</span> <span class=\"n\">b</span><span class=\"p\">,</span> <span class=\"n\">scalar_t</span> <span class=\"n\">c</span><span class=\"p\">):</span></pre>\n",
       "<pre class='cython code score-595 '>/* Python wrapper */\n",
       "static PyObject *__pyx_pw_46_cython_magic_749e2f06f11f9a32dbdfa8eae1a17ea3_1compute(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/\n",
       "static PyMethodDef __pyx_mdef_46_cython_magic_749e2f06f11f9a32dbdfa8eae1a17ea3_1compute = {\"compute\", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_46_cython_magic_749e2f06f11f9a32dbdfa8eae1a17ea3_1compute, METH_VARARGS|METH_KEYWORDS, 0};\n",
       "static PyObject *__pyx_pw_46_cython_magic_749e2f06f11f9a32dbdfa8eae1a17ea3_1compute(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {\n",
       "  PyObject *__pyx_v_signatures = 0;\n",
       "  PyObject *__pyx_v_args = 0;\n",
       "  PyObject *__pyx_v_kwargs = 0;\n",
       "  CYTHON_UNUSED PyObject *__pyx_v_defaults = 0;\n",
       "  PyObject *__pyx_r = 0;\n",
       "  <span class='refnanny'>__Pyx_RefNannyDeclarations</span>\n",
       "  <span class='refnanny'>__Pyx_RefNannySetupContext</span>(\"__pyx_fused_cpdef (wrapper)\", 0);\n",
       "  {\n",
       "    static PyObject **__pyx_pyargnames[] = {&amp;__pyx_n_s_signatures,&amp;__pyx_n_s_args,&amp;__pyx_n_s_kwargs,&amp;__pyx_n_s_defaults,0};\n",
       "    PyObject* values[4] = {0,0,0,0};\n",
       "    if (unlikely(__pyx_kwds)) {\n",
       "      Py_ssize_t kw_args;\n",
       "      const Py_ssize_t pos_args = <span class='py_macro_api'>PyTuple_GET_SIZE</span>(__pyx_args);\n",
       "      switch (pos_args) {\n",
       "        case  4: values[3] = <span class='py_macro_api'>PyTuple_GET_ITEM</span>(__pyx_args, 3);\n",
       "        CYTHON_FALLTHROUGH;\n",
       "        case  3: values[2] = <span class='py_macro_api'>PyTuple_GET_ITEM</span>(__pyx_args, 2);\n",
       "        CYTHON_FALLTHROUGH;\n",
       "        case  2: values[1] = <span class='py_macro_api'>PyTuple_GET_ITEM</span>(__pyx_args, 1);\n",
       "        CYTHON_FALLTHROUGH;\n",
       "        case  1: values[0] = <span class='py_macro_api'>PyTuple_GET_ITEM</span>(__pyx_args, 0);\n",
       "        CYTHON_FALLTHROUGH;\n",
       "        case  0: break;\n",
       "        default: goto __pyx_L5_argtuple_error;\n",
       "      }\n",
       "      kw_args = <span class='py_c_api'>PyDict_Size</span>(__pyx_kwds);\n",
       "      switch (pos_args) {\n",
       "        case  0:\n",
       "        if (likely((values[0] = <span class='pyx_c_api'>__Pyx_PyDict_GetItemStr</span>(__pyx_kwds, __pyx_n_s_signatures)) != 0)) kw_args--;\n",
       "        else goto __pyx_L5_argtuple_error;\n",
       "        CYTHON_FALLTHROUGH;\n",
       "        case  1:\n",
       "        if (likely((values[1] = <span class='pyx_c_api'>__Pyx_PyDict_GetItemStr</span>(__pyx_kwds, __pyx_n_s_args)) != 0)) kw_args--;\n",
       "        else {\n",
       "          <span class='pyx_c_api'>__Pyx_RaiseArgtupleInvalid</span>(\"__pyx_fused_cpdef\", 1, 4, 4, 1); <span class='error_goto'>__PYX_ERR(0, 15, __pyx_L3_error)</span>\n",
       "        }\n",
       "        CYTHON_FALLTHROUGH;\n",
       "        case  2:\n",
       "        if (likely((values[2] = <span class='pyx_c_api'>__Pyx_PyDict_GetItemStr</span>(__pyx_kwds, __pyx_n_s_kwargs)) != 0)) kw_args--;\n",
       "        else {\n",
       "          <span class='pyx_c_api'>__Pyx_RaiseArgtupleInvalid</span>(\"__pyx_fused_cpdef\", 1, 4, 4, 2); <span class='error_goto'>__PYX_ERR(0, 15, __pyx_L3_error)</span>\n",
       "        }\n",
       "        CYTHON_FALLTHROUGH;\n",
       "        case  3:\n",
       "        if (likely((values[3] = <span class='pyx_c_api'>__Pyx_PyDict_GetItemStr</span>(__pyx_kwds, __pyx_n_s_defaults)) != 0)) kw_args--;\n",
       "        else {\n",
       "          <span class='pyx_c_api'>__Pyx_RaiseArgtupleInvalid</span>(\"__pyx_fused_cpdef\", 1, 4, 4, 3); <span class='error_goto'>__PYX_ERR(0, 15, __pyx_L3_error)</span>\n",
       "        }\n",
       "      }\n",
       "      if (unlikely(kw_args &gt; 0)) {\n",
       "        if (unlikely(<span class='pyx_c_api'>__Pyx_ParseOptionalKeywords</span>(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, \"__pyx_fused_cpdef\") &lt; 0)) <span class='error_goto'>__PYX_ERR(0, 15, __pyx_L3_error)</span>\n",
       "      }\n",
       "    } else if (<span class='py_macro_api'>PyTuple_GET_SIZE</span>(__pyx_args) != 4) {\n",
       "      goto __pyx_L5_argtuple_error;\n",
       "    } else {\n",
       "      values[0] = <span class='py_macro_api'>PyTuple_GET_ITEM</span>(__pyx_args, 0);\n",
       "      values[1] = <span class='py_macro_api'>PyTuple_GET_ITEM</span>(__pyx_args, 1);\n",
       "      values[2] = <span class='py_macro_api'>PyTuple_GET_ITEM</span>(__pyx_args, 2);\n",
       "      values[3] = <span class='py_macro_api'>PyTuple_GET_ITEM</span>(__pyx_args, 3);\n",
       "    }\n",
       "    __pyx_v_signatures = values[0];\n",
       "    __pyx_v_args = values[1];\n",
       "    __pyx_v_kwargs = values[2];\n",
       "    __pyx_v_defaults = values[3];\n",
       "  }\n",
       "  goto __pyx_L4_argument_unpacking_done;\n",
       "  __pyx_L5_argtuple_error:;\n",
       "  <span class='pyx_c_api'>__Pyx_RaiseArgtupleInvalid</span>(\"__pyx_fused_cpdef\", 1, 4, 4, <span class='py_macro_api'>PyTuple_GET_SIZE</span>(__pyx_args)); <span class='error_goto'>__PYX_ERR(0, 15, __pyx_L3_error)</span>\n",
       "  __pyx_L3_error:;\n",
       "  <span class='pyx_c_api'>__Pyx_AddTraceback</span>(\"_cython_magic_749e2f06f11f9a32dbdfa8eae1a17ea3.__pyx_fused_cpdef\", __pyx_clineno, __pyx_lineno, __pyx_filename);\n",
       "  <span class='refnanny'>__Pyx_RefNannyFinishContext</span>();\n",
       "  return NULL;\n",
       "  __pyx_L4_argument_unpacking_done:;\n",
       "  __pyx_r = __pyx_pf_46_cython_magic_749e2f06f11f9a32dbdfa8eae1a17ea3_compute(__pyx_self, __pyx_v_signatures, __pyx_v_args, __pyx_v_kwargs, __pyx_v_defaults);\n",
       "\n",
       "  /* function exit code */\n",
       "  <span class='refnanny'>__Pyx_RefNannyFinishContext</span>();\n",
       "  return __pyx_r;\n",
       "}\n",
       "\n",
       "static PyObject *__pyx_pf_46_cython_magic_749e2f06f11f9a32dbdfa8eae1a17ea3_compute(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_signatures, PyObject *__pyx_v_args, PyObject *__pyx_v_kwargs, CYTHON_UNUSED PyObject *__pyx_v_defaults) {\n",
       "  PyObject *__pyx_v_dest_sig = NULL;\n",
       "  Py_ssize_t __pyx_v_i;\n",
       "  PyTypeObject *__pyx_v_ndarray = 0;\n",
       "  __Pyx_memviewslice __pyx_v_memslice;\n",
       "  Py_ssize_t __pyx_v_itemsize;\n",
       "  int __pyx_v_dtype_signed;\n",
       "  char __pyx_v_kind;\n",
       "  int __pyx_v_int_is_signed;\n",
       "  PyObject *__pyx_v_arg = NULL;\n",
       "  PyObject *__pyx_v_dtype = NULL;\n",
       "  PyObject *__pyx_v_arg_base = NULL;\n",
       "  PyObject *__pyx_v_candidates = NULL;\n",
       "  PyObject *__pyx_v_sig = NULL;\n",
       "  int __pyx_v_match_found;\n",
       "  PyObject *__pyx_v_src_sig = NULL;\n",
       "  PyObject *__pyx_v_dst_type = NULL;\n",
       "  PyObject *__pyx_r = NULL;\n",
       "  <span class='refnanny'>__Pyx_RefNannyDeclarations</span>\n",
       "  <span class='refnanny'>__Pyx_RefNannySetupContext</span>(\"compute\", 0);\n",
       "  <span class='pyx_macro_api'>__Pyx_INCREF</span>(__pyx_v_kwargs);\n",
       "  __pyx_t_1 = <span class='py_c_api'>PyList_New</span>(1);<span class='error_goto'> if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 15, __pyx_L1_error)</span>\n",
       "  <span class='refnanny'>__Pyx_GOTREF</span>(__pyx_t_1);\n",
       "  <span class='pyx_macro_api'>__Pyx_INCREF</span>(Py_None);\n",
       "  <span class='refnanny'>__Pyx_GIVEREF</span>(Py_None);\n",
       "  <span class='py_macro_api'>PyList_SET_ITEM</span>(__pyx_t_1, 0, Py_None);\n",
       "  __pyx_v_dest_sig = ((PyObject*)__pyx_t_1);\n",
       "  __pyx_t_1 = 0;\n",
       "  __pyx_t_3 = (__pyx_v_kwargs != Py_None);\n",
       "  __pyx_t_4 = (__pyx_t_3 != 0);\n",
       "  if (__pyx_t_4) {\n",
       "  } else {\n",
       "    __pyx_t_2 = __pyx_t_4;\n",
       "    goto __pyx_L4_bool_binop_done;\n",
       "  }\n",
       "  __pyx_t_4 = <span class='pyx_c_api'>__Pyx_PyObject_IsTrue</span>(__pyx_v_kwargs); if (unlikely(__pyx_t_4 &lt; 0)) <span class='error_goto'>__PYX_ERR(0, 15, __pyx_L1_error)</span>\n",
       "  __pyx_t_3 = ((!__pyx_t_4) != 0);\n",
       "  __pyx_t_2 = __pyx_t_3;\n",
       "  __pyx_L4_bool_binop_done:;\n",
       "  if (__pyx_t_2) {\n",
       "    <span class='pyx_macro_api'>__Pyx_INCREF</span>(Py_None);\n",
       "    <span class='pyx_macro_api'>__Pyx_DECREF_SET</span>(__pyx_v_kwargs, Py_None);\n",
       "  }\n",
       "  __pyx_t_1 = ((PyObject *)<span class='pyx_c_api'>__Pyx_ImportNumPyArrayTypeIfAvailable</span>());<span class='error_goto'> if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 15, __pyx_L1_error)</span>\n",
       "  <span class='refnanny'>__Pyx_GOTREF</span>(__pyx_t_1);\n",
       "  __pyx_v_ndarray = ((PyTypeObject*)__pyx_t_1);\n",
       "  __pyx_t_1 = 0;\n",
       "  __pyx_v_itemsize = -1L;\n",
       "  __pyx_v_int_is_signed = (!((((int)-1L) &gt; 0) != 0));\n",
       "  if (unlikely(__pyx_v_args == Py_None)) {\n",
       "    <span class='py_c_api'>PyErr_SetString</span>(PyExc_TypeError, \"object of type 'NoneType' has no len()\");\n",
       "    <span class='error_goto'>__PYX_ERR(0, 15, __pyx_L1_error)</span>\n",
       "  }\n",
       "  __pyx_t_5 = <span class='py_macro_api'>PyTuple_GET_SIZE</span>(((PyObject*)__pyx_v_args));<span class='error_goto'> if (unlikely(__pyx_t_5 == ((Py_ssize_t)-1))) __PYX_ERR(0, 15, __pyx_L1_error)</span>\n",
       "  __pyx_t_2 = ((0 &lt; __pyx_t_5) != 0);\n",
       "  if (__pyx_t_2) {\n",
       "    if (unlikely(__pyx_v_args == Py_None)) {\n",
       "      <span class='py_c_api'>PyErr_SetString</span>(PyExc_TypeError, \"'NoneType' object is not subscriptable\");\n",
       "      <span class='error_goto'>__PYX_ERR(0, 15, __pyx_L1_error)</span>\n",
       "    }\n",
       "    __pyx_t_1 = <span class='py_macro_api'>PyTuple_GET_ITEM</span>(((PyObject*)__pyx_v_args), 0);\n",
       "    <span class='pyx_macro_api'>__Pyx_INCREF</span>(__pyx_t_1);\n",
       "    __pyx_v_arg = __pyx_t_1;\n",
       "    __pyx_t_1 = 0;\n",
       "    goto __pyx_L6;\n",
       "  }\n",
       "  __pyx_t_3 = (__pyx_v_kwargs != Py_None);\n",
       "  __pyx_t_4 = (__pyx_t_3 != 0);\n",
       "  if (__pyx_t_4) {\n",
       "  } else {\n",
       "    __pyx_t_2 = __pyx_t_4;\n",
       "    goto __pyx_L7_bool_binop_done;\n",
       "  }\n",
       "  if (unlikely(__pyx_v_kwargs == Py_None)) {\n",
       "    <span class='py_c_api'>PyErr_SetString</span>(PyExc_TypeError, \"'NoneType' object is not iterable\");\n",
       "    <span class='error_goto'>__PYX_ERR(0, 15, __pyx_L1_error)</span>\n",
       "  }\n",
       "  __pyx_t_4 = (<span class='pyx_c_api'>__Pyx_PyDict_ContainsTF</span>(__pyx_n_s_array_1, ((PyObject*)__pyx_v_kwargs), Py_EQ)); if (unlikely(__pyx_t_4 &lt; 0)) <span class='error_goto'>__PYX_ERR(0, 15, __pyx_L1_error)</span>\n",
       "  __pyx_t_3 = (__pyx_t_4 != 0);\n",
       "  __pyx_t_2 = __pyx_t_3;\n",
       "  __pyx_L7_bool_binop_done:;\n",
       "  if (__pyx_t_2) {\n",
       "    if (unlikely(__pyx_v_kwargs == Py_None)) {\n",
       "      <span class='py_c_api'>PyErr_SetString</span>(PyExc_TypeError, \"'NoneType' object is not subscriptable\");\n",
       "      <span class='error_goto'>__PYX_ERR(0, 15, __pyx_L1_error)</span>\n",
       "    }\n",
       "    __pyx_t_1 = <span class='pyx_c_api'>__Pyx_PyDict_GetItem</span>(((PyObject*)__pyx_v_kwargs), __pyx_n_s_array_1);<span class='error_goto'> if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 15, __pyx_L1_error)</span>\n",
       "    <span class='refnanny'>__Pyx_GOTREF</span>(__pyx_t_1);\n",
       "    __pyx_v_arg = __pyx_t_1;\n",
       "    __pyx_t_1 = 0;\n",
       "    goto __pyx_L6;\n",
       "  }\n",
       "  /*else*/ {\n",
       "    if (unlikely(__pyx_v_args == Py_None)) {\n",
       "      <span class='py_c_api'>PyErr_SetString</span>(PyExc_TypeError, \"object of type 'NoneType' has no len()\");\n",
       "      <span class='error_goto'>__PYX_ERR(0, 15, __pyx_L1_error)</span>\n",
       "    }\n",
       "    __pyx_t_5 = <span class='py_macro_api'>PyTuple_GET_SIZE</span>(((PyObject*)__pyx_v_args));<span class='error_goto'> if (unlikely(__pyx_t_5 == ((Py_ssize_t)-1))) __PYX_ERR(0, 15, __pyx_L1_error)</span>\n",
       "    __pyx_t_1 = <span class='py_c_api'>PyInt_FromSsize_t</span>(__pyx_t_5);<span class='error_goto'> if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 15, __pyx_L1_error)</span>\n",
       "    <span class='refnanny'>__Pyx_GOTREF</span>(__pyx_t_1);\n",
       "    __pyx_t_6 = <span class='py_c_api'>PyTuple_New</span>(3);<span class='error_goto'> if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 15, __pyx_L1_error)</span>\n",
       "    <span class='refnanny'>__Pyx_GOTREF</span>(__pyx_t_6);\n",
       "    <span class='pyx_macro_api'>__Pyx_INCREF</span>(__pyx_int_5);\n",
       "    <span class='refnanny'>__Pyx_GIVEREF</span>(__pyx_int_5);\n",
       "    <span class='py_macro_api'>PyTuple_SET_ITEM</span>(__pyx_t_6, 0, __pyx_int_5);\n",
       "    <span class='pyx_macro_api'>__Pyx_INCREF</span>(__pyx_n_s_s);\n",
       "    <span class='refnanny'>__Pyx_GIVEREF</span>(__pyx_n_s_s);\n",
       "    <span class='py_macro_api'>PyTuple_SET_ITEM</span>(__pyx_t_6, 1, __pyx_n_s_s);\n",
       "    <span class='refnanny'>__Pyx_GIVEREF</span>(__pyx_t_1);\n",
       "    <span class='py_macro_api'>PyTuple_SET_ITEM</span>(__pyx_t_6, 2, __pyx_t_1);\n",
       "    __pyx_t_1 = 0;\n",
       "    __pyx_t_1 = <span class='pyx_c_api'>__Pyx_PyString_Format</span>(__pyx_kp_s_Expected_at_least_d_argument_s_g, __pyx_t_6);<span class='error_goto'> if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 15, __pyx_L1_error)</span>\n",
       "    <span class='refnanny'>__Pyx_GOTREF</span>(__pyx_t_1);\n",
       "    <span class='pyx_macro_api'>__Pyx_DECREF</span>(__pyx_t_6); __pyx_t_6 = 0;\n",
       "    __pyx_t_6 = <span class='pyx_c_api'>__Pyx_PyObject_CallOneArg</span>(__pyx_builtin_TypeError, __pyx_t_1);<span class='error_goto'> if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 15, __pyx_L1_error)</span>\n",
       "    <span class='refnanny'>__Pyx_GOTREF</span>(__pyx_t_6);\n",
       "    <span class='pyx_macro_api'>__Pyx_DECREF</span>(__pyx_t_1); __pyx_t_1 = 0;\n",
       "    <span class='pyx_c_api'>__Pyx_Raise</span>(__pyx_t_6, 0, 0, 0);\n",
       "    <span class='pyx_macro_api'>__Pyx_DECREF</span>(__pyx_t_6); __pyx_t_6 = 0;\n",
       "    <span class='error_goto'>__PYX_ERR(0, 15, __pyx_L1_error)</span>\n",
       "  }\n",
       "  __pyx_L6:;\n",
       "  while (1) {\n",
       "    __pyx_t_2 = (__pyx_v_ndarray != ((PyTypeObject*)Py_None));\n",
       "    __pyx_t_3 = (__pyx_t_2 != 0);\n",
       "    if (__pyx_t_3) {\n",
       "      __pyx_t_3 = <span class='pyx_c_api'>__Pyx_TypeCheck</span>(__pyx_v_arg, __pyx_v_ndarray); \n",
       "      __pyx_t_2 = (__pyx_t_3 != 0);\n",
       "      if (__pyx_t_2) {\n",
       "        __pyx_t_6 = <span class='pyx_c_api'>__Pyx_PyObject_GetAttrStr</span>(__pyx_v_arg, __pyx_n_s_dtype);<span class='error_goto'> if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 15, __pyx_L1_error)</span>\n",
       "        <span class='refnanny'>__Pyx_GOTREF</span>(__pyx_t_6);\n",
       "        __pyx_v_dtype = __pyx_t_6;\n",
       "        __pyx_t_6 = 0;\n",
       "        goto __pyx_L12;\n",
       "      }\n",
       "      __pyx_t_2 = __pyx_memoryview_check(__pyx_v_arg); \n",
       "      __pyx_t_3 = (__pyx_t_2 != 0);\n",
       "      if (__pyx_t_3) {\n",
       "        __pyx_t_6 = <span class='pyx_c_api'>__Pyx_PyObject_GetAttrStr</span>(__pyx_v_arg, __pyx_n_s_base);<span class='error_goto'> if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 15, __pyx_L1_error)</span>\n",
       "        <span class='refnanny'>__Pyx_GOTREF</span>(__pyx_t_6);\n",
       "        __pyx_v_arg_base = __pyx_t_6;\n",
       "        __pyx_t_6 = 0;\n",
       "        __pyx_t_3 = <span class='pyx_c_api'>__Pyx_TypeCheck</span>(__pyx_v_arg_base, __pyx_v_ndarray); \n",
       "        __pyx_t_2 = (__pyx_t_3 != 0);\n",
       "        if (__pyx_t_2) {\n",
       "          __pyx_t_6 = <span class='pyx_c_api'>__Pyx_PyObject_GetAttrStr</span>(__pyx_v_arg_base, __pyx_n_s_dtype);<span class='error_goto'> if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 15, __pyx_L1_error)</span>\n",
       "          <span class='refnanny'>__Pyx_GOTREF</span>(__pyx_t_6);\n",
       "          __pyx_v_dtype = __pyx_t_6;\n",
       "          __pyx_t_6 = 0;\n",
       "          goto __pyx_L13;\n",
       "        }\n",
       "        /*else*/ {\n",
       "          <span class='pyx_macro_api'>__Pyx_INCREF</span>(Py_None);\n",
       "          __pyx_v_dtype = Py_None;\n",
       "        }\n",
       "        __pyx_L13:;\n",
       "        goto __pyx_L12;\n",
       "      }\n",
       "      /*else*/ {\n",
       "        <span class='pyx_macro_api'>__Pyx_INCREF</span>(Py_None);\n",
       "        __pyx_v_dtype = Py_None;\n",
       "      }\n",
       "      __pyx_L12:;\n",
       "      __pyx_v_itemsize = -1L;\n",
       "      __pyx_t_2 = (__pyx_v_dtype != Py_None);\n",
       "      __pyx_t_3 = (__pyx_t_2 != 0);\n",
       "      if (__pyx_t_3) {\n",
       "        __pyx_t_6 = <span class='pyx_c_api'>__Pyx_PyObject_GetAttrStr</span>(__pyx_v_dtype, __pyx_n_s_itemsize);<span class='error_goto'> if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 15, __pyx_L1_error)</span>\n",
       "        <span class='refnanny'>__Pyx_GOTREF</span>(__pyx_t_6);\n",
       "        __pyx_t_5 = <span class='pyx_c_api'>__Pyx_PyIndex_AsSsize_t</span>(__pyx_t_6); if (unlikely((__pyx_t_5 == (Py_ssize_t)-1) &amp;&amp; <span class='py_c_api'>PyErr_Occurred</span>())) <span class='error_goto'>__PYX_ERR(0, 15, __pyx_L1_error)</span>\n",
       "        <span class='pyx_macro_api'>__Pyx_DECREF</span>(__pyx_t_6); __pyx_t_6 = 0;\n",
       "        __pyx_v_itemsize = __pyx_t_5;\n",
       "        __pyx_t_6 = <span class='pyx_c_api'>__Pyx_PyObject_GetAttrStr</span>(__pyx_v_dtype, __pyx_n_s_kind);<span class='error_goto'> if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 15, __pyx_L1_error)</span>\n",
       "        <span class='refnanny'>__Pyx_GOTREF</span>(__pyx_t_6);\n",
       "        __pyx_t_7 = <span class='pyx_c_api'>__Pyx_PyObject_Ord</span>(__pyx_t_6);<span class='error_goto'> if (unlikely(__pyx_t_7 == ((long)(long)(Py_UCS4)-1))) __PYX_ERR(0, 15, __pyx_L1_error)</span>\n",
       "        <span class='pyx_macro_api'>__Pyx_DECREF</span>(__pyx_t_6); __pyx_t_6 = 0;\n",
       "        __pyx_v_kind = __pyx_t_7;\n",
       "        __pyx_v_dtype_signed = (__pyx_v_kind == 'i');\n",
       "        switch (__pyx_v_kind) {\n",
       "          case 'i':\n",
       "          case 'u':\n",
       "          __pyx_t_2 = (((sizeof(int)) == __pyx_v_itemsize) != 0);\n",
       "          if (__pyx_t_2) {\n",
       "          } else {\n",
       "            __pyx_t_3 = __pyx_t_2;\n",
       "            goto __pyx_L16_bool_binop_done;\n",
       "          }\n",
       "          __pyx_t_6 = <span class='pyx_c_api'>__Pyx_PyObject_GetAttrStr</span>(__pyx_v_arg, __pyx_n_s_ndim);<span class='error_goto'> if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 15, __pyx_L1_error)</span>\n",
       "          <span class='refnanny'>__Pyx_GOTREF</span>(__pyx_t_6);\n",
       "          __pyx_t_5 = <span class='pyx_c_api'>__Pyx_PyIndex_AsSsize_t</span>(__pyx_t_6); if (unlikely((__pyx_t_5 == (Py_ssize_t)-1) &amp;&amp; <span class='py_c_api'>PyErr_Occurred</span>())) <span class='error_goto'>__PYX_ERR(0, 15, __pyx_L1_error)</span>\n",
       "          <span class='pyx_macro_api'>__Pyx_DECREF</span>(__pyx_t_6); __pyx_t_6 = 0;\n",
       "          __pyx_t_2 = ((((Py_ssize_t)__pyx_t_5) == 2) != 0);\n",
       "          if (__pyx_t_2) {\n",
       "          } else {\n",
       "            __pyx_t_3 = __pyx_t_2;\n",
       "            goto __pyx_L16_bool_binop_done;\n",
       "          }\n",
       "          __pyx_t_2 = ((!((__pyx_v_int_is_signed ^ __pyx_v_dtype_signed) != 0)) != 0);\n",
       "          __pyx_t_3 = __pyx_t_2;\n",
       "          __pyx_L16_bool_binop_done:;\n",
       "          if (__pyx_t_3) {\n",
       "            if (unlikely(<span class='pyx_c_api'>__Pyx_SetItemInt</span>(__pyx_v_dest_sig, 0, __pyx_n_s_int, long, 1, __Pyx_PyInt_From_long, 1, 0, 0) &lt; 0)) <span class='error_goto'>__PYX_ERR(0, 15, __pyx_L1_error)</span>\n",
       "            goto __pyx_L10_break;\n",
       "          }\n",
       "          break;\n",
       "          case 'f':\n",
       "          __pyx_t_2 = (((sizeof(float)) == __pyx_v_itemsize) != 0);\n",
       "          if (__pyx_t_2) {\n",
       "          } else {\n",
       "            __pyx_t_3 = __pyx_t_2;\n",
       "            goto __pyx_L20_bool_binop_done;\n",
       "          }\n",
       "          __pyx_t_6 = <span class='pyx_c_api'>__Pyx_PyObject_GetAttrStr</span>(__pyx_v_arg, __pyx_n_s_ndim);<span class='error_goto'> if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 15, __pyx_L1_error)</span>\n",
       "          <span class='refnanny'>__Pyx_GOTREF</span>(__pyx_t_6);\n",
       "          __pyx_t_5 = <span class='pyx_c_api'>__Pyx_PyIndex_AsSsize_t</span>(__pyx_t_6); if (unlikely((__pyx_t_5 == (Py_ssize_t)-1) &amp;&amp; <span class='py_c_api'>PyErr_Occurred</span>())) <span class='error_goto'>__PYX_ERR(0, 15, __pyx_L1_error)</span>\n",
       "          <span class='pyx_macro_api'>__Pyx_DECREF</span>(__pyx_t_6); __pyx_t_6 = 0;\n",
       "          __pyx_t_2 = ((((Py_ssize_t)__pyx_t_5) == 2) != 0);\n",
       "          __pyx_t_3 = __pyx_t_2;\n",
       "          __pyx_L20_bool_binop_done:;\n",
       "          if (__pyx_t_3) {\n",
       "            if (unlikely(<span class='pyx_c_api'>__Pyx_SetItemInt</span>(__pyx_v_dest_sig, 0, __pyx_n_s_float, long, 1, __Pyx_PyInt_From_long, 1, 0, 0) &lt; 0)) <span class='error_goto'>__PYX_ERR(0, 15, __pyx_L1_error)</span>\n",
       "            goto __pyx_L10_break;\n",
       "          }\n",
       "          __pyx_t_2 = (((sizeof(double)) == __pyx_v_itemsize) != 0);\n",
       "          if (__pyx_t_2) {\n",
       "          } else {\n",
       "            __pyx_t_3 = __pyx_t_2;\n",
       "            goto __pyx_L23_bool_binop_done;\n",
       "          }\n",
       "          __pyx_t_6 = <span class='pyx_c_api'>__Pyx_PyObject_GetAttrStr</span>(__pyx_v_arg, __pyx_n_s_ndim);<span class='error_goto'> if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 15, __pyx_L1_error)</span>\n",
       "          <span class='refnanny'>__Pyx_GOTREF</span>(__pyx_t_6);\n",
       "          __pyx_t_5 = <span class='pyx_c_api'>__Pyx_PyIndex_AsSsize_t</span>(__pyx_t_6); if (unlikely((__pyx_t_5 == (Py_ssize_t)-1) &amp;&amp; <span class='py_c_api'>PyErr_Occurred</span>())) <span class='error_goto'>__PYX_ERR(0, 15, __pyx_L1_error)</span>\n",
       "          <span class='pyx_macro_api'>__Pyx_DECREF</span>(__pyx_t_6); __pyx_t_6 = 0;\n",
       "          __pyx_t_2 = ((((Py_ssize_t)__pyx_t_5) == 2) != 0);\n",
       "          __pyx_t_3 = __pyx_t_2;\n",
       "          __pyx_L23_bool_binop_done:;\n",
       "          if (__pyx_t_3) {\n",
       "            if (unlikely(<span class='pyx_c_api'>__Pyx_SetItemInt</span>(__pyx_v_dest_sig, 0, __pyx_n_s_double, long, 1, __Pyx_PyInt_From_long, 1, 0, 0) &lt; 0)) <span class='error_goto'>__PYX_ERR(0, 15, __pyx_L1_error)</span>\n",
       "            goto __pyx_L10_break;\n",
       "          }\n",
       "          break;\n",
       "          case 'c':\n",
       "          break;\n",
       "          case 'O':\n",
       "          break;\n",
       "          default: break;\n",
       "        }\n",
       "      }\n",
       "    }\n",
       "    __pyx_t_2 = ((__pyx_v_itemsize == -1L) != 0);\n",
       "    if (!__pyx_t_2) {\n",
       "    } else {\n",
       "      __pyx_t_3 = __pyx_t_2;\n",
       "      goto __pyx_L26_bool_binop_done;\n",
       "    }\n",
       "    __pyx_t_2 = ((__pyx_v_itemsize == (sizeof(int))) != 0);\n",
       "    __pyx_t_3 = __pyx_t_2;\n",
       "    __pyx_L26_bool_binop_done:;\n",
       "    if (__pyx_t_3) {\n",
       "      __pyx_t_8 = <span class='pyx_c_api'>__Pyx_PyObject_to_MemoryviewSlice_d_dc_int</span>(__pyx_v_arg, 0); \n",
       "      __pyx_v_memslice = __pyx_t_8;\n",
       "      __pyx_t_3 = (__pyx_v_memslice.memview != 0);\n",
       "      if (__pyx_t_3) {\n",
       "        __PYX_XDEC_MEMVIEW((&amp;__pyx_v_memslice), 1); \n",
       "        if (unlikely(<span class='pyx_c_api'>__Pyx_SetItemInt</span>(__pyx_v_dest_sig, 0, __pyx_n_s_int, long, 1, __Pyx_PyInt_From_long, 1, 0, 0) &lt; 0)) <span class='error_goto'>__PYX_ERR(0, 15, __pyx_L1_error)</span>\n",
       "        goto __pyx_L10_break;\n",
       "      }\n",
       "      /*else*/ {\n",
       "        <span class='py_c_api'>PyErr_Clear</span>(); \n",
       "      }\n",
       "    }\n",
       "    __pyx_t_2 = ((__pyx_v_itemsize == -1L) != 0);\n",
       "    if (!__pyx_t_2) {\n",
       "    } else {\n",
       "      __pyx_t_3 = __pyx_t_2;\n",
       "      goto __pyx_L30_bool_binop_done;\n",
       "    }\n",
       "    __pyx_t_2 = ((__pyx_v_itemsize == (sizeof(float))) != 0);\n",
       "    __pyx_t_3 = __pyx_t_2;\n",
       "    __pyx_L30_bool_binop_done:;\n",
       "    if (__pyx_t_3) {\n",
       "      __pyx_t_8 = <span class='pyx_c_api'>__Pyx_PyObject_to_MemoryviewSlice_d_dc_float</span>(__pyx_v_arg, 0); \n",
       "      __pyx_v_memslice = __pyx_t_8;\n",
       "      __pyx_t_3 = (__pyx_v_memslice.memview != 0);\n",
       "      if (__pyx_t_3) {\n",
       "        __PYX_XDEC_MEMVIEW((&amp;__pyx_v_memslice), 1); \n",
       "        if (unlikely(<span class='pyx_c_api'>__Pyx_SetItemInt</span>(__pyx_v_dest_sig, 0, __pyx_n_s_float, long, 1, __Pyx_PyInt_From_long, 1, 0, 0) &lt; 0)) <span class='error_goto'>__PYX_ERR(0, 15, __pyx_L1_error)</span>\n",
       "        goto __pyx_L10_break;\n",
       "      }\n",
       "      /*else*/ {\n",
       "        <span class='py_c_api'>PyErr_Clear</span>(); \n",
       "      }\n",
       "    }\n",
       "    __pyx_t_2 = ((__pyx_v_itemsize == -1L) != 0);\n",
       "    if (!__pyx_t_2) {\n",
       "    } else {\n",
       "      __pyx_t_3 = __pyx_t_2;\n",
       "      goto __pyx_L34_bool_binop_done;\n",
       "    }\n",
       "    __pyx_t_2 = ((__pyx_v_itemsize == (sizeof(double))) != 0);\n",
       "    __pyx_t_3 = __pyx_t_2;\n",
       "    __pyx_L34_bool_binop_done:;\n",
       "    if (__pyx_t_3) {\n",
       "      __pyx_t_8 = <span class='pyx_c_api'>__Pyx_PyObject_to_MemoryviewSlice_d_dc_double</span>(__pyx_v_arg, 0); \n",
       "      __pyx_v_memslice = __pyx_t_8;\n",
       "      __pyx_t_3 = (__pyx_v_memslice.memview != 0);\n",
       "      if (__pyx_t_3) {\n",
       "        __PYX_XDEC_MEMVIEW((&amp;__pyx_v_memslice), 1); \n",
       "        if (unlikely(<span class='pyx_c_api'>__Pyx_SetItemInt</span>(__pyx_v_dest_sig, 0, __pyx_n_s_double, long, 1, __Pyx_PyInt_From_long, 1, 0, 0) &lt; 0)) <span class='error_goto'>__PYX_ERR(0, 15, __pyx_L1_error)</span>\n",
       "        goto __pyx_L10_break;\n",
       "      }\n",
       "      /*else*/ {\n",
       "        <span class='py_c_api'>PyErr_Clear</span>(); \n",
       "      }\n",
       "    }\n",
       "    if (unlikely(<span class='pyx_c_api'>__Pyx_SetItemInt</span>(__pyx_v_dest_sig, 0, Py_None, long, 1, __Pyx_PyInt_From_long, 1, 0, 0) &lt; 0)) <span class='error_goto'>__PYX_ERR(0, 15, __pyx_L1_error)</span>\n",
       "    goto __pyx_L10_break;\n",
       "  }\n",
       "  __pyx_L10_break:;\n",
       "  __pyx_t_6 = <span class='py_c_api'>PyList_New</span>(0);<span class='error_goto'> if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 15, __pyx_L1_error)</span>\n",
       "  <span class='refnanny'>__Pyx_GOTREF</span>(__pyx_t_6);\n",
       "  __pyx_v_candidates = ((PyObject*)__pyx_t_6);\n",
       "  __pyx_t_6 = 0;\n",
       "  __pyx_t_5 = 0;\n",
       "  if (unlikely(__pyx_v_signatures == Py_None)) {\n",
       "    <span class='py_c_api'>PyErr_SetString</span>(PyExc_TypeError, \"'NoneType' object is not iterable\");\n",
       "    <span class='error_goto'>__PYX_ERR(0, 15, __pyx_L1_error)</span>\n",
       "  }\n",
       "  __pyx_t_1 = __Pyx_dict_iterator(((PyObject*)__pyx_v_signatures), 1, ((PyObject *)NULL), (&amp;__pyx_t_9), (&amp;__pyx_t_10));<span class='error_goto'> if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 15, __pyx_L1_error)</span>\n",
       "  <span class='refnanny'>__Pyx_GOTREF</span>(__pyx_t_1);\n",
       "  <span class='pyx_macro_api'>__Pyx_XDECREF</span>(__pyx_t_6);\n",
       "  __pyx_t_6 = __pyx_t_1;\n",
       "  __pyx_t_1 = 0;\n",
       "  while (1) {\n",
       "    __pyx_t_11 = __Pyx_dict_iter_next(__pyx_t_6, __pyx_t_9, &amp;__pyx_t_5, &amp;__pyx_t_1, NULL, NULL, __pyx_t_10);\n",
       "    if (unlikely(__pyx_t_11 == 0)) break;\n",
       "    if (unlikely(__pyx_t_11 == -1)) <span class='error_goto'>__PYX_ERR(0, 15, __pyx_L1_error)</span>\n",
       "    <span class='refnanny'>__Pyx_GOTREF</span>(__pyx_t_1);\n",
       "    <span class='pyx_macro_api'>__Pyx_XDECREF_SET</span>(__pyx_v_sig, __pyx_t_1);\n",
       "    __pyx_t_1 = 0;\n",
       "    __pyx_v_match_found = 0;\n",
       "    __pyx_t_13 = <span class='pyx_c_api'>__Pyx_PyObject_GetAttrStr</span>(__pyx_v_sig, __pyx_n_s_strip);<span class='error_goto'> if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 15, __pyx_L1_error)</span>\n",
       "    <span class='refnanny'>__Pyx_GOTREF</span>(__pyx_t_13);\n",
       "    __pyx_t_14 = NULL;\n",
       "    if (CYTHON_UNPACK_METHODS &amp;&amp; likely(<span class='py_c_api'>PyMethod_Check</span>(__pyx_t_13))) {\n",
       "      __pyx_t_14 = <span class='py_macro_api'>PyMethod_GET_SELF</span>(__pyx_t_13);\n",
       "      if (likely(__pyx_t_14)) {\n",
       "        PyObject* function = <span class='py_macro_api'>PyMethod_GET_FUNCTION</span>(__pyx_t_13);\n",
       "        <span class='pyx_macro_api'>__Pyx_INCREF</span>(__pyx_t_14);\n",
       "        <span class='pyx_macro_api'>__Pyx_INCREF</span>(function);\n",
       "        <span class='pyx_macro_api'>__Pyx_DECREF_SET</span>(__pyx_t_13, function);\n",
       "      }\n",
       "    }\n",
       "    __pyx_t_12 = (__pyx_t_14) ? __Pyx_PyObject_Call2Args(__pyx_t_13, __pyx_t_14, __pyx_kp_s_) : <span class='pyx_c_api'>__Pyx_PyObject_CallOneArg</span>(__pyx_t_13, __pyx_kp_s_);\n",
       "    <span class='pyx_macro_api'>__Pyx_XDECREF</span>(__pyx_t_14); __pyx_t_14 = 0;\n",
       "    if (unlikely(!__pyx_t_12)) <span class='error_goto'>__PYX_ERR(0, 15, __pyx_L1_error)</span>\n",
       "    <span class='refnanny'>__Pyx_GOTREF</span>(__pyx_t_12);\n",
       "    <span class='pyx_macro_api'>__Pyx_DECREF</span>(__pyx_t_13); __pyx_t_13 = 0;\n",
       "    __pyx_t_13 = <span class='pyx_c_api'>__Pyx_PyObject_GetAttrStr</span>(__pyx_t_12, __pyx_n_s_split);<span class='error_goto'> if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 15, __pyx_L1_error)</span>\n",
       "    <span class='refnanny'>__Pyx_GOTREF</span>(__pyx_t_13);\n",
       "    <span class='pyx_macro_api'>__Pyx_DECREF</span>(__pyx_t_12); __pyx_t_12 = 0;\n",
       "    __pyx_t_12 = NULL;\n",
       "    if (CYTHON_UNPACK_METHODS &amp;&amp; likely(<span class='py_c_api'>PyMethod_Check</span>(__pyx_t_13))) {\n",
       "      __pyx_t_12 = <span class='py_macro_api'>PyMethod_GET_SELF</span>(__pyx_t_13);\n",
       "      if (likely(__pyx_t_12)) {\n",
       "        PyObject* function = <span class='py_macro_api'>PyMethod_GET_FUNCTION</span>(__pyx_t_13);\n",
       "        <span class='pyx_macro_api'>__Pyx_INCREF</span>(__pyx_t_12);\n",
       "        <span class='pyx_macro_api'>__Pyx_INCREF</span>(function);\n",
       "        <span class='pyx_macro_api'>__Pyx_DECREF_SET</span>(__pyx_t_13, function);\n",
       "      }\n",
       "    }\n",
       "    __pyx_t_1 = (__pyx_t_12) ? __Pyx_PyObject_Call2Args(__pyx_t_13, __pyx_t_12, __pyx_kp_s__2) : <span class='pyx_c_api'>__Pyx_PyObject_CallOneArg</span>(__pyx_t_13, __pyx_kp_s__2);\n",
       "    <span class='pyx_macro_api'>__Pyx_XDECREF</span>(__pyx_t_12); __pyx_t_12 = 0;\n",
       "    if (unlikely(!__pyx_t_1)) <span class='error_goto'>__PYX_ERR(0, 15, __pyx_L1_error)</span>\n",
       "    <span class='refnanny'>__Pyx_GOTREF</span>(__pyx_t_1);\n",
       "    <span class='pyx_macro_api'>__Pyx_DECREF</span>(__pyx_t_13); __pyx_t_13 = 0;\n",
       "    <span class='pyx_macro_api'>__Pyx_XDECREF_SET</span>(__pyx_v_src_sig, __pyx_t_1);\n",
       "    __pyx_t_1 = 0;\n",
       "    __pyx_t_15 = <span class='py_macro_api'>PyList_GET_SIZE</span>(__pyx_v_dest_sig);<span class='error_goto'> if (unlikely(__pyx_t_15 == ((Py_ssize_t)-1))) __PYX_ERR(0, 15, __pyx_L1_error)</span>\n",
       "    __pyx_t_16 = __pyx_t_15;\n",
       "    for (__pyx_t_17 = 0; __pyx_t_17 &lt; __pyx_t_16; __pyx_t_17+=1) {\n",
       "      __pyx_v_i = __pyx_t_17;\n",
       "      __pyx_t_1 = <span class='py_macro_api'>PyList_GET_ITEM</span>(__pyx_v_dest_sig, __pyx_v_i);\n",
       "      <span class='pyx_macro_api'>__Pyx_INCREF</span>(__pyx_t_1);\n",
       "      <span class='pyx_macro_api'>__Pyx_XDECREF_SET</span>(__pyx_v_dst_type, __pyx_t_1);\n",
       "      __pyx_t_1 = 0;\n",
       "      __pyx_t_3 = (__pyx_v_dst_type != Py_None);\n",
       "      __pyx_t_2 = (__pyx_t_3 != 0);\n",
       "      if (__pyx_t_2) {\n",
       "        __pyx_t_1 = <span class='pyx_c_api'>__Pyx_GetItemInt</span>(__pyx_v_src_sig, __pyx_v_i, Py_ssize_t, 1, PyInt_FromSsize_t, 0, 0, 0);<span class='error_goto'> if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 15, __pyx_L1_error)</span>\n",
       "        <span class='refnanny'>__Pyx_GOTREF</span>(__pyx_t_1);\n",
       "        __pyx_t_13 = <span class='py_c_api'>PyObject_RichCompare</span>(__pyx_t_1, __pyx_v_dst_type, Py_EQ); <span class='refnanny'>__Pyx_XGOTREF</span>(__pyx_t_13);<span class='error_goto'> if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 15, __pyx_L1_error)</span>\n",
       "        <span class='pyx_macro_api'>__Pyx_DECREF</span>(__pyx_t_1); __pyx_t_1 = 0;\n",
       "        __pyx_t_2 = <span class='pyx_c_api'>__Pyx_PyObject_IsTrue</span>(__pyx_t_13); if (unlikely(__pyx_t_2 &lt; 0)) <span class='error_goto'>__PYX_ERR(0, 15, __pyx_L1_error)</span>\n",
       "        <span class='pyx_macro_api'>__Pyx_DECREF</span>(__pyx_t_13); __pyx_t_13 = 0;\n",
       "        if (__pyx_t_2) {\n",
       "          __pyx_v_match_found = 1;\n",
       "          goto __pyx_L42;\n",
       "        }\n",
       "        /*else*/ {\n",
       "          __pyx_v_match_found = 0;\n",
       "          goto __pyx_L40_break;\n",
       "        }\n",
       "        __pyx_L42:;\n",
       "      }\n",
       "    }\n",
       "    __pyx_L40_break:;\n",
       "    __pyx_t_2 = (__pyx_v_match_found != 0);\n",
       "    if (__pyx_t_2) {\n",
       "      __pyx_t_18 = <span class='pyx_c_api'>__Pyx_PyList_Append</span>(__pyx_v_candidates, __pyx_v_sig);<span class='error_goto'> if (unlikely(__pyx_t_18 == ((int)-1))) __PYX_ERR(0, 15, __pyx_L1_error)</span>\n",
       "    }\n",
       "  }\n",
       "  <span class='pyx_macro_api'>__Pyx_DECREF</span>(__pyx_t_6); __pyx_t_6 = 0;\n",
       "  __pyx_t_2 = (<span class='py_macro_api'>PyList_GET_SIZE</span>(__pyx_v_candidates) != 0);\n",
       "  __pyx_t_3 = ((!__pyx_t_2) != 0);\n",
       "  if (__pyx_t_3) {\n",
       "    __pyx_t_6 = <span class='pyx_c_api'>__Pyx_PyObject_Call</span>(__pyx_builtin_TypeError, __pyx_tuple__3, NULL);<span class='error_goto'> if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 15, __pyx_L1_error)</span>\n",
       "    <span class='refnanny'>__Pyx_GOTREF</span>(__pyx_t_6);\n",
       "    <span class='pyx_c_api'>__Pyx_Raise</span>(__pyx_t_6, 0, 0, 0);\n",
       "    <span class='pyx_macro_api'>__Pyx_DECREF</span>(__pyx_t_6); __pyx_t_6 = 0;\n",
       "    <span class='error_goto'>__PYX_ERR(0, 15, __pyx_L1_error)</span>\n",
       "  }\n",
       "  __pyx_t_9 = <span class='py_macro_api'>PyList_GET_SIZE</span>(__pyx_v_candidates);<span class='error_goto'> if (unlikely(__pyx_t_9 == ((Py_ssize_t)-1))) __PYX_ERR(0, 15, __pyx_L1_error)</span>\n",
       "  __pyx_t_3 = ((__pyx_t_9 &gt; 1) != 0);\n",
       "  if (__pyx_t_3) {\n",
       "/* … */\n",
       "  __pyx_tuple__3 = <span class='py_c_api'>PyTuple_Pack</span>(1, __pyx_kp_s_No_matching_signature_found);<span class='error_goto'> if (unlikely(!__pyx_tuple__3)) __PYX_ERR(0, 15, __pyx_L1_error)</span>\n",
       "  <span class='refnanny'>__Pyx_GOTREF</span>(__pyx_tuple__3);\n",
       "  <span class='refnanny'>__Pyx_GIVEREF</span>(__pyx_tuple__3);\n",
       "    __pyx_t_6 = <span class='pyx_c_api'>__Pyx_PyObject_Call</span>(__pyx_builtin_TypeError, __pyx_tuple__4, NULL);<span class='error_goto'> if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 15, __pyx_L1_error)</span>\n",
       "    <span class='refnanny'>__Pyx_GOTREF</span>(__pyx_t_6);\n",
       "    <span class='pyx_c_api'>__Pyx_Raise</span>(__pyx_t_6, 0, 0, 0);\n",
       "    <span class='pyx_macro_api'>__Pyx_DECREF</span>(__pyx_t_6); __pyx_t_6 = 0;\n",
       "    <span class='error_goto'>__PYX_ERR(0, 15, __pyx_L1_error)</span>\n",
       "  }\n",
       "  /*else*/ {\n",
       "    <span class='pyx_macro_api'>__Pyx_XDECREF</span>(__pyx_r);\n",
       "    if (unlikely(__pyx_v_signatures == Py_None)) {\n",
       "      <span class='py_c_api'>PyErr_SetString</span>(PyExc_TypeError, \"'NoneType' object is not subscriptable\");\n",
       "      <span class='error_goto'>__PYX_ERR(0, 15, __pyx_L1_error)</span>\n",
       "    }\n",
       "    __pyx_t_6 = <span class='pyx_c_api'>__Pyx_PyDict_GetItem</span>(((PyObject*)__pyx_v_signatures), <span class='py_macro_api'>PyList_GET_ITEM</span>(__pyx_v_candidates, 0));<span class='error_goto'> if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 15, __pyx_L1_error)</span>\n",
       "    <span class='refnanny'>__Pyx_GOTREF</span>(__pyx_t_6);\n",
       "    __pyx_r = __pyx_t_6;\n",
       "    __pyx_t_6 = 0;\n",
       "    goto __pyx_L0;\n",
       "  }\n",
       "\n",
       "  /* function exit code */\n",
       "  __pyx_L1_error:;\n",
       "  <span class='pyx_macro_api'>__Pyx_XDECREF</span>(__pyx_t_1);\n",
       "  <span class='pyx_macro_api'>__Pyx_XDECREF</span>(__pyx_t_6);\n",
       "  <span class='pyx_macro_api'>__Pyx_XDECREF</span>(__pyx_t_12);\n",
       "  <span class='pyx_macro_api'>__Pyx_XDECREF</span>(__pyx_t_13);\n",
       "  <span class='pyx_macro_api'>__Pyx_XDECREF</span>(__pyx_t_14);\n",
       "  <span class='pyx_c_api'>__Pyx_AddTraceback</span>(\"_cython_magic_749e2f06f11f9a32dbdfa8eae1a17ea3.__pyx_fused_cpdef\", __pyx_clineno, __pyx_lineno, __pyx_filename);\n",
       "  __pyx_r = NULL;\n",
       "  __pyx_L0:;\n",
       "  <span class='pyx_macro_api'>__Pyx_XDECREF</span>(__pyx_v_dest_sig);\n",
       "  <span class='pyx_macro_api'>__Pyx_XDECREF</span>(__pyx_v_ndarray);\n",
       "  <span class='pyx_macro_api'>__Pyx_XDECREF</span>(__pyx_v_arg);\n",
       "  <span class='pyx_macro_api'>__Pyx_XDECREF</span>(__pyx_v_dtype);\n",
       "  <span class='pyx_macro_api'>__Pyx_XDECREF</span>(__pyx_v_arg_base);\n",
       "  <span class='pyx_macro_api'>__Pyx_XDECREF</span>(__pyx_v_candidates);\n",
       "  <span class='pyx_macro_api'>__Pyx_XDECREF</span>(__pyx_v_sig);\n",
       "  <span class='pyx_macro_api'>__Pyx_XDECREF</span>(__pyx_v_src_sig);\n",
       "  <span class='pyx_macro_api'>__Pyx_XDECREF</span>(__pyx_v_dst_type);\n",
       "  <span class='pyx_macro_api'>__Pyx_XDECREF</span>(__pyx_v_kwargs);\n",
       "  <span class='refnanny'>__Pyx_XGIVEREF</span>(__pyx_r);\n",
       "  <span class='refnanny'>__Pyx_RefNannyFinishContext</span>();\n",
       "  return __pyx_r;\n",
       "}\n",
       "\n",
       "/* Python wrapper */\n",
       "static PyObject *__pyx_fuse_0__pyx_pw_46_cython_magic_749e2f06f11f9a32dbdfa8eae1a17ea3_3compute(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/\n",
       "static PyMethodDef __pyx_fuse_0__pyx_mdef_46_cython_magic_749e2f06f11f9a32dbdfa8eae1a17ea3_3compute = {\"__pyx_fuse_0compute\", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_fuse_0__pyx_pw_46_cython_magic_749e2f06f11f9a32dbdfa8eae1a17ea3_3compute, METH_VARARGS|METH_KEYWORDS, 0};\n",
       "static PyObject *__pyx_fuse_0__pyx_pw_46_cython_magic_749e2f06f11f9a32dbdfa8eae1a17ea3_3compute(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {\n",
       "  __Pyx_memviewslice __pyx_v_array_1 = { 0, 0, { 0 }, { 0 }, { 0 } };\n",
       "  __Pyx_memviewslice __pyx_v_array_2 = { 0, 0, { 0 }, { 0 }, { 0 } };\n",
       "  int __pyx_v_a;\n",
       "  int __pyx_v_b;\n",
       "  int __pyx_v_c;\n",
       "  PyObject *__pyx_r = 0;\n",
       "  <span class='refnanny'>__Pyx_RefNannyDeclarations</span>\n",
       "  <span class='refnanny'>__Pyx_RefNannySetupContext</span>(\"compute (wrapper)\", 0);\n",
       "  {\n",
       "    static PyObject **__pyx_pyargnames[] = {&amp;__pyx_n_s_array_1,&amp;__pyx_n_s_array_2,&amp;__pyx_n_s_a,&amp;__pyx_n_s_b,&amp;__pyx_n_s_c,0};\n",
       "    PyObject* values[5] = {0,0,0,0,0};\n",
       "    if (unlikely(__pyx_kwds)) {\n",
       "      Py_ssize_t kw_args;\n",
       "      const Py_ssize_t pos_args = <span class='py_macro_api'>PyTuple_GET_SIZE</span>(__pyx_args);\n",
       "      switch (pos_args) {\n",
       "        case  5: values[4] = <span class='py_macro_api'>PyTuple_GET_ITEM</span>(__pyx_args, 4);\n",
       "        CYTHON_FALLTHROUGH;\n",
       "        case  4: values[3] = <span class='py_macro_api'>PyTuple_GET_ITEM</span>(__pyx_args, 3);\n",
       "        CYTHON_FALLTHROUGH;\n",
       "        case  3: values[2] = <span class='py_macro_api'>PyTuple_GET_ITEM</span>(__pyx_args, 2);\n",
       "        CYTHON_FALLTHROUGH;\n",
       "        case  2: values[1] = <span class='py_macro_api'>PyTuple_GET_ITEM</span>(__pyx_args, 1);\n",
       "        CYTHON_FALLTHROUGH;\n",
       "        case  1: values[0] = <span class='py_macro_api'>PyTuple_GET_ITEM</span>(__pyx_args, 0);\n",
       "        CYTHON_FALLTHROUGH;\n",
       "        case  0: break;\n",
       "        default: goto __pyx_L5_argtuple_error;\n",
       "      }\n",
       "      kw_args = <span class='py_c_api'>PyDict_Size</span>(__pyx_kwds);\n",
       "      switch (pos_args) {\n",
       "        case  0:\n",
       "        if (likely((values[0] = <span class='pyx_c_api'>__Pyx_PyDict_GetItemStr</span>(__pyx_kwds, __pyx_n_s_array_1)) != 0)) kw_args--;\n",
       "        else goto __pyx_L5_argtuple_error;\n",
       "        CYTHON_FALLTHROUGH;\n",
       "        case  1:\n",
       "        if (likely((values[1] = <span class='pyx_c_api'>__Pyx_PyDict_GetItemStr</span>(__pyx_kwds, __pyx_n_s_array_2)) != 0)) kw_args--;\n",
       "        else {\n",
       "          <span class='pyx_c_api'>__Pyx_RaiseArgtupleInvalid</span>(\"compute\", 1, 5, 5, 1); <span class='error_goto'>__PYX_ERR(0, 15, __pyx_L3_error)</span>\n",
       "        }\n",
       "        CYTHON_FALLTHROUGH;\n",
       "        case  2:\n",
       "        if (likely((values[2] = <span class='pyx_c_api'>__Pyx_PyDict_GetItemStr</span>(__pyx_kwds, __pyx_n_s_a)) != 0)) kw_args--;\n",
       "        else {\n",
       "          <span class='pyx_c_api'>__Pyx_RaiseArgtupleInvalid</span>(\"compute\", 1, 5, 5, 2); <span class='error_goto'>__PYX_ERR(0, 15, __pyx_L3_error)</span>\n",
       "        }\n",
       "        CYTHON_FALLTHROUGH;\n",
       "        case  3:\n",
       "        if (likely((values[3] = <span class='pyx_c_api'>__Pyx_PyDict_GetItemStr</span>(__pyx_kwds, __pyx_n_s_b)) != 0)) kw_args--;\n",
       "        else {\n",
       "          <span class='pyx_c_api'>__Pyx_RaiseArgtupleInvalid</span>(\"compute\", 1, 5, 5, 3); <span class='error_goto'>__PYX_ERR(0, 15, __pyx_L3_error)</span>\n",
       "        }\n",
       "        CYTHON_FALLTHROUGH;\n",
       "        case  4:\n",
       "        if (likely((values[4] = <span class='pyx_c_api'>__Pyx_PyDict_GetItemStr</span>(__pyx_kwds, __pyx_n_s_c)) != 0)) kw_args--;\n",
       "        else {\n",
       "          <span class='pyx_c_api'>__Pyx_RaiseArgtupleInvalid</span>(\"compute\", 1, 5, 5, 4); <span class='error_goto'>__PYX_ERR(0, 15, __pyx_L3_error)</span>\n",
       "        }\n",
       "      }\n",
       "      if (unlikely(kw_args &gt; 0)) {\n",
       "        if (unlikely(<span class='pyx_c_api'>__Pyx_ParseOptionalKeywords</span>(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, \"compute\") &lt; 0)) <span class='error_goto'>__PYX_ERR(0, 15, __pyx_L3_error)</span>\n",
       "      }\n",
       "    } else if (<span class='py_macro_api'>PyTuple_GET_SIZE</span>(__pyx_args) != 5) {\n",
       "      goto __pyx_L5_argtuple_error;\n",
       "    } else {\n",
       "      values[0] = <span class='py_macro_api'>PyTuple_GET_ITEM</span>(__pyx_args, 0);\n",
       "      values[1] = <span class='py_macro_api'>PyTuple_GET_ITEM</span>(__pyx_args, 1);\n",
       "      values[2] = <span class='py_macro_api'>PyTuple_GET_ITEM</span>(__pyx_args, 2);\n",
       "      values[3] = <span class='py_macro_api'>PyTuple_GET_ITEM</span>(__pyx_args, 3);\n",
       "      values[4] = <span class='py_macro_api'>PyTuple_GET_ITEM</span>(__pyx_args, 4);\n",
       "    }\n",
       "    __pyx_v_array_1 = <span class='pyx_c_api'>__Pyx_PyObject_to_MemoryviewSlice_d_dc_int</span>(values[0], PyBUF_WRITABLE);<span class='error_goto'> if (unlikely(!__pyx_v_array_1.memview)) __PYX_ERR(0, 15, __pyx_L3_error)</span>\n",
       "    __pyx_v_array_2 = <span class='pyx_c_api'>__Pyx_PyObject_to_MemoryviewSlice_d_dc_int</span>(values[1], PyBUF_WRITABLE);<span class='error_goto'> if (unlikely(!__pyx_v_array_2.memview)) __PYX_ERR(0, 15, __pyx_L3_error)</span>\n",
       "    __pyx_v_a = <span class='pyx_c_api'>__Pyx_PyInt_As_int</span>(values[2]); if (unlikely((__pyx_v_a == (int)-1) &amp;&amp; <span class='py_c_api'>PyErr_Occurred</span>())) <span class='error_goto'>__PYX_ERR(0, 15, __pyx_L3_error)</span>\n",
       "    __pyx_v_b = <span class='pyx_c_api'>__Pyx_PyInt_As_int</span>(values[3]); if (unlikely((__pyx_v_b == (int)-1) &amp;&amp; <span class='py_c_api'>PyErr_Occurred</span>())) <span class='error_goto'>__PYX_ERR(0, 15, __pyx_L3_error)</span>\n",
       "    __pyx_v_c = <span class='pyx_c_api'>__Pyx_PyInt_As_int</span>(values[4]); if (unlikely((__pyx_v_c == (int)-1) &amp;&amp; <span class='py_c_api'>PyErr_Occurred</span>())) <span class='error_goto'>__PYX_ERR(0, 15, __pyx_L3_error)</span>\n",
       "  }\n",
       "  goto __pyx_L4_argument_unpacking_done;\n",
       "  __pyx_L5_argtuple_error:;\n",
       "  <span class='pyx_c_api'>__Pyx_RaiseArgtupleInvalid</span>(\"compute\", 1, 5, 5, <span class='py_macro_api'>PyTuple_GET_SIZE</span>(__pyx_args)); <span class='error_goto'>__PYX_ERR(0, 15, __pyx_L3_error)</span>\n",
       "  __pyx_L3_error:;\n",
       "  <span class='pyx_c_api'>__Pyx_AddTraceback</span>(\"_cython_magic_749e2f06f11f9a32dbdfa8eae1a17ea3.compute\", __pyx_clineno, __pyx_lineno, __pyx_filename);\n",
       "  <span class='refnanny'>__Pyx_RefNannyFinishContext</span>();\n",
       "  return NULL;\n",
       "  __pyx_L4_argument_unpacking_done:;\n",
       "  __pyx_r = __pyx_pf_46_cython_magic_749e2f06f11f9a32dbdfa8eae1a17ea3_2compute(__pyx_self, __pyx_v_array_1, __pyx_v_array_2, __pyx_v_a, __pyx_v_b, __pyx_v_c);\n",
       "\n",
       "  /* function exit code */\n",
       "  <span class='refnanny'>__Pyx_RefNannyFinishContext</span>();\n",
       "  return __pyx_r;\n",
       "}\n",
       "\n",
       "static PyObject *__pyx_pf_46_cython_magic_749e2f06f11f9a32dbdfa8eae1a17ea3_2compute(CYTHON_UNUSED PyObject *__pyx_self, __Pyx_memviewslice __pyx_v_array_1, __Pyx_memviewslice __pyx_v_array_2, int __pyx_v_a, int __pyx_v_b, int __pyx_v_c) {\n",
       "  Py_ssize_t __pyx_v_x_max;\n",
       "  Py_ssize_t __pyx_v_y_max;\n",
       "  PyObject *__pyx_v_dtype = NULL;\n",
       "  PyObject *__pyx_v_result = NULL;\n",
       "  __Pyx_memviewslice __pyx_v_result_view = { 0, 0, { 0 }, { 0 }, { 0 } };\n",
       "  int __pyx_v_tmp;\n",
       "  Py_ssize_t __pyx_v_x;\n",
       "  Py_ssize_t __pyx_v_y;\n",
       "  PyObject *__pyx_r = NULL;\n",
       "  <span class='refnanny'>__Pyx_RefNannyDeclarations</span>\n",
       "  <span class='refnanny'>__Pyx_RefNannySetupContext</span>(\"__pyx_fuse_0compute\", 0);\n",
       "/* … */\n",
       "  /* function exit code */\n",
       "  __pyx_L1_error:;\n",
       "  <span class='pyx_macro_api'>__Pyx_XDECREF</span>(__pyx_t_1);\n",
       "  <span class='pyx_macro_api'>__Pyx_XDECREF</span>(__pyx_t_2);\n",
       "  <span class='pyx_macro_api'>__Pyx_XDECREF</span>(__pyx_t_3);\n",
       "  <span class='pyx_macro_api'>__Pyx_XDECREF</span>(__pyx_t_5);\n",
       "  __PYX_XDEC_MEMVIEW(&amp;__pyx_t_6, 1);\n",
       "  <span class='pyx_c_api'>__Pyx_AddTraceback</span>(\"_cython_magic_749e2f06f11f9a32dbdfa8eae1a17ea3.compute\", __pyx_clineno, __pyx_lineno, __pyx_filename);\n",
       "  __pyx_r = NULL;\n",
       "  __pyx_L0:;\n",
       "  <span class='pyx_macro_api'>__Pyx_XDECREF</span>(__pyx_v_dtype);\n",
       "  <span class='pyx_macro_api'>__Pyx_XDECREF</span>(__pyx_v_result);\n",
       "  __PYX_XDEC_MEMVIEW(&amp;__pyx_v_result_view, 1);\n",
       "  __PYX_XDEC_MEMVIEW(&amp;__pyx_v_array_1, 1);\n",
       "  __PYX_XDEC_MEMVIEW(&amp;__pyx_v_array_2, 1);\n",
       "  <span class='refnanny'>__Pyx_XGIVEREF</span>(__pyx_r);\n",
       "  <span class='refnanny'>__Pyx_RefNannyFinishContext</span>();\n",
       "  return __pyx_r;\n",
       "}\n",
       "\n",
       "/* Python wrapper */\n",
       "static PyObject *__pyx_fuse_1__pyx_pw_46_cython_magic_749e2f06f11f9a32dbdfa8eae1a17ea3_5compute(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/\n",
       "static PyMethodDef __pyx_fuse_1__pyx_mdef_46_cython_magic_749e2f06f11f9a32dbdfa8eae1a17ea3_5compute = {\"__pyx_fuse_1compute\", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_fuse_1__pyx_pw_46_cython_magic_749e2f06f11f9a32dbdfa8eae1a17ea3_5compute, METH_VARARGS|METH_KEYWORDS, 0};\n",
       "static PyObject *__pyx_fuse_1__pyx_pw_46_cython_magic_749e2f06f11f9a32dbdfa8eae1a17ea3_5compute(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {\n",
       "  __Pyx_memviewslice __pyx_v_array_1 = { 0, 0, { 0 }, { 0 }, { 0 } };\n",
       "  __Pyx_memviewslice __pyx_v_array_2 = { 0, 0, { 0 }, { 0 }, { 0 } };\n",
       "  float __pyx_v_a;\n",
       "  float __pyx_v_b;\n",
       "  float __pyx_v_c;\n",
       "  PyObject *__pyx_r = 0;\n",
       "  <span class='refnanny'>__Pyx_RefNannyDeclarations</span>\n",
       "  <span class='refnanny'>__Pyx_RefNannySetupContext</span>(\"compute (wrapper)\", 0);\n",
       "  {\n",
       "    static PyObject **__pyx_pyargnames[] = {&amp;__pyx_n_s_array_1,&amp;__pyx_n_s_array_2,&amp;__pyx_n_s_a,&amp;__pyx_n_s_b,&amp;__pyx_n_s_c,0};\n",
       "    PyObject* values[5] = {0,0,0,0,0};\n",
       "    if (unlikely(__pyx_kwds)) {\n",
       "      Py_ssize_t kw_args;\n",
       "      const Py_ssize_t pos_args = <span class='py_macro_api'>PyTuple_GET_SIZE</span>(__pyx_args);\n",
       "      switch (pos_args) {\n",
       "        case  5: values[4] = <span class='py_macro_api'>PyTuple_GET_ITEM</span>(__pyx_args, 4);\n",
       "        CYTHON_FALLTHROUGH;\n",
       "        case  4: values[3] = <span class='py_macro_api'>PyTuple_GET_ITEM</span>(__pyx_args, 3);\n",
       "        CYTHON_FALLTHROUGH;\n",
       "        case  3: values[2] = <span class='py_macro_api'>PyTuple_GET_ITEM</span>(__pyx_args, 2);\n",
       "        CYTHON_FALLTHROUGH;\n",
       "        case  2: values[1] = <span class='py_macro_api'>PyTuple_GET_ITEM</span>(__pyx_args, 1);\n",
       "        CYTHON_FALLTHROUGH;\n",
       "        case  1: values[0] = <span class='py_macro_api'>PyTuple_GET_ITEM</span>(__pyx_args, 0);\n",
       "        CYTHON_FALLTHROUGH;\n",
       "        case  0: break;\n",
       "        default: goto __pyx_L5_argtuple_error;\n",
       "      }\n",
       "      kw_args = <span class='py_c_api'>PyDict_Size</span>(__pyx_kwds);\n",
       "      switch (pos_args) {\n",
       "        case  0:\n",
       "        if (likely((values[0] = <span class='pyx_c_api'>__Pyx_PyDict_GetItemStr</span>(__pyx_kwds, __pyx_n_s_array_1)) != 0)) kw_args--;\n",
       "        else goto __pyx_L5_argtuple_error;\n",
       "        CYTHON_FALLTHROUGH;\n",
       "        case  1:\n",
       "        if (likely((values[1] = <span class='pyx_c_api'>__Pyx_PyDict_GetItemStr</span>(__pyx_kwds, __pyx_n_s_array_2)) != 0)) kw_args--;\n",
       "        else {\n",
       "          <span class='pyx_c_api'>__Pyx_RaiseArgtupleInvalid</span>(\"compute\", 1, 5, 5, 1); <span class='error_goto'>__PYX_ERR(0, 15, __pyx_L3_error)</span>\n",
       "        }\n",
       "        CYTHON_FALLTHROUGH;\n",
       "        case  2:\n",
       "        if (likely((values[2] = <span class='pyx_c_api'>__Pyx_PyDict_GetItemStr</span>(__pyx_kwds, __pyx_n_s_a)) != 0)) kw_args--;\n",
       "        else {\n",
       "          <span class='pyx_c_api'>__Pyx_RaiseArgtupleInvalid</span>(\"compute\", 1, 5, 5, 2); <span class='error_goto'>__PYX_ERR(0, 15, __pyx_L3_error)</span>\n",
       "        }\n",
       "        CYTHON_FALLTHROUGH;\n",
       "        case  3:\n",
       "        if (likely((values[3] = <span class='pyx_c_api'>__Pyx_PyDict_GetItemStr</span>(__pyx_kwds, __pyx_n_s_b)) != 0)) kw_args--;\n",
       "        else {\n",
       "          <span class='pyx_c_api'>__Pyx_RaiseArgtupleInvalid</span>(\"compute\", 1, 5, 5, 3); <span class='error_goto'>__PYX_ERR(0, 15, __pyx_L3_error)</span>\n",
       "        }\n",
       "        CYTHON_FALLTHROUGH;\n",
       "        case  4:\n",
       "        if (likely((values[4] = <span class='pyx_c_api'>__Pyx_PyDict_GetItemStr</span>(__pyx_kwds, __pyx_n_s_c)) != 0)) kw_args--;\n",
       "        else {\n",
       "          <span class='pyx_c_api'>__Pyx_RaiseArgtupleInvalid</span>(\"compute\", 1, 5, 5, 4); <span class='error_goto'>__PYX_ERR(0, 15, __pyx_L3_error)</span>\n",
       "        }\n",
       "      }\n",
       "      if (unlikely(kw_args &gt; 0)) {\n",
       "        if (unlikely(<span class='pyx_c_api'>__Pyx_ParseOptionalKeywords</span>(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, \"compute\") &lt; 0)) <span class='error_goto'>__PYX_ERR(0, 15, __pyx_L3_error)</span>\n",
       "      }\n",
       "    } else if (<span class='py_macro_api'>PyTuple_GET_SIZE</span>(__pyx_args) != 5) {\n",
       "      goto __pyx_L5_argtuple_error;\n",
       "    } else {\n",
       "      values[0] = <span class='py_macro_api'>PyTuple_GET_ITEM</span>(__pyx_args, 0);\n",
       "      values[1] = <span class='py_macro_api'>PyTuple_GET_ITEM</span>(__pyx_args, 1);\n",
       "      values[2] = <span class='py_macro_api'>PyTuple_GET_ITEM</span>(__pyx_args, 2);\n",
       "      values[3] = <span class='py_macro_api'>PyTuple_GET_ITEM</span>(__pyx_args, 3);\n",
       "      values[4] = <span class='py_macro_api'>PyTuple_GET_ITEM</span>(__pyx_args, 4);\n",
       "    }\n",
       "    __pyx_v_array_1 = <span class='pyx_c_api'>__Pyx_PyObject_to_MemoryviewSlice_d_dc_float</span>(values[0], PyBUF_WRITABLE);<span class='error_goto'> if (unlikely(!__pyx_v_array_1.memview)) __PYX_ERR(0, 15, __pyx_L3_error)</span>\n",
       "    __pyx_v_array_2 = <span class='pyx_c_api'>__Pyx_PyObject_to_MemoryviewSlice_d_dc_float</span>(values[1], PyBUF_WRITABLE);<span class='error_goto'> if (unlikely(!__pyx_v_array_2.memview)) __PYX_ERR(0, 15, __pyx_L3_error)</span>\n",
       "    __pyx_v_a = __pyx_<span class='py_c_api'>PyFloat_AsFloat</span>(values[2]); if (unlikely((__pyx_v_a == (float)-1) &amp;&amp; <span class='py_c_api'>PyErr_Occurred</span>())) <span class='error_goto'>__PYX_ERR(0, 15, __pyx_L3_error)</span>\n",
       "    __pyx_v_b = __pyx_<span class='py_c_api'>PyFloat_AsFloat</span>(values[3]); if (unlikely((__pyx_v_b == (float)-1) &amp;&amp; <span class='py_c_api'>PyErr_Occurred</span>())) <span class='error_goto'>__PYX_ERR(0, 15, __pyx_L3_error)</span>\n",
       "    __pyx_v_c = __pyx_<span class='py_c_api'>PyFloat_AsFloat</span>(values[4]); if (unlikely((__pyx_v_c == (float)-1) &amp;&amp; <span class='py_c_api'>PyErr_Occurred</span>())) <span class='error_goto'>__PYX_ERR(0, 15, __pyx_L3_error)</span>\n",
       "  }\n",
       "  goto __pyx_L4_argument_unpacking_done;\n",
       "  __pyx_L5_argtuple_error:;\n",
       "  <span class='pyx_c_api'>__Pyx_RaiseArgtupleInvalid</span>(\"compute\", 1, 5, 5, <span class='py_macro_api'>PyTuple_GET_SIZE</span>(__pyx_args)); <span class='error_goto'>__PYX_ERR(0, 15, __pyx_L3_error)</span>\n",
       "  __pyx_L3_error:;\n",
       "  <span class='pyx_c_api'>__Pyx_AddTraceback</span>(\"_cython_magic_749e2f06f11f9a32dbdfa8eae1a17ea3.compute\", __pyx_clineno, __pyx_lineno, __pyx_filename);\n",
       "  <span class='refnanny'>__Pyx_RefNannyFinishContext</span>();\n",
       "  return NULL;\n",
       "  __pyx_L4_argument_unpacking_done:;\n",
       "  __pyx_r = __pyx_pf_46_cython_magic_749e2f06f11f9a32dbdfa8eae1a17ea3_4compute(__pyx_self, __pyx_v_array_1, __pyx_v_array_2, __pyx_v_a, __pyx_v_b, __pyx_v_c);\n",
       "\n",
       "  /* function exit code */\n",
       "  <span class='refnanny'>__Pyx_RefNannyFinishContext</span>();\n",
       "  return __pyx_r;\n",
       "}\n",
       "\n",
       "static PyObject *__pyx_pf_46_cython_magic_749e2f06f11f9a32dbdfa8eae1a17ea3_4compute(CYTHON_UNUSED PyObject *__pyx_self, __Pyx_memviewslice __pyx_v_array_1, __Pyx_memviewslice __pyx_v_array_2, float __pyx_v_a, float __pyx_v_b, float __pyx_v_c) {\n",
       "  Py_ssize_t __pyx_v_x_max;\n",
       "  Py_ssize_t __pyx_v_y_max;\n",
       "  PyObject *__pyx_v_dtype = NULL;\n",
       "  PyObject *__pyx_v_result = NULL;\n",
       "  __Pyx_memviewslice __pyx_v_result_view = { 0, 0, { 0 }, { 0 }, { 0 } };\n",
       "  float __pyx_v_tmp;\n",
       "  Py_ssize_t __pyx_v_x;\n",
       "  Py_ssize_t __pyx_v_y;\n",
       "  PyObject *__pyx_r = NULL;\n",
       "  <span class='refnanny'>__Pyx_RefNannyDeclarations</span>\n",
       "  <span class='refnanny'>__Pyx_RefNannySetupContext</span>(\"__pyx_fuse_1compute\", 0);\n",
       "/* … */\n",
       "  /* function exit code */\n",
       "  __pyx_L1_error:;\n",
       "  <span class='pyx_macro_api'>__Pyx_XDECREF</span>(__pyx_t_1);\n",
       "  <span class='pyx_macro_api'>__Pyx_XDECREF</span>(__pyx_t_2);\n",
       "  <span class='pyx_macro_api'>__Pyx_XDECREF</span>(__pyx_t_3);\n",
       "  <span class='pyx_macro_api'>__Pyx_XDECREF</span>(__pyx_t_5);\n",
       "  __PYX_XDEC_MEMVIEW(&amp;__pyx_t_6, 1);\n",
       "  <span class='pyx_c_api'>__Pyx_AddTraceback</span>(\"_cython_magic_749e2f06f11f9a32dbdfa8eae1a17ea3.compute\", __pyx_clineno, __pyx_lineno, __pyx_filename);\n",
       "  __pyx_r = NULL;\n",
       "  __pyx_L0:;\n",
       "  <span class='pyx_macro_api'>__Pyx_XDECREF</span>(__pyx_v_dtype);\n",
       "  <span class='pyx_macro_api'>__Pyx_XDECREF</span>(__pyx_v_result);\n",
       "  __PYX_XDEC_MEMVIEW(&amp;__pyx_v_result_view, 1);\n",
       "  __PYX_XDEC_MEMVIEW(&amp;__pyx_v_array_1, 1);\n",
       "  __PYX_XDEC_MEMVIEW(&amp;__pyx_v_array_2, 1);\n",
       "  <span class='refnanny'>__Pyx_XGIVEREF</span>(__pyx_r);\n",
       "  <span class='refnanny'>__Pyx_RefNannyFinishContext</span>();\n",
       "  return __pyx_r;\n",
       "}\n",
       "\n",
       "/* Python wrapper */\n",
       "static PyObject *__pyx_fuse_2__pyx_pw_46_cython_magic_749e2f06f11f9a32dbdfa8eae1a17ea3_7compute(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/\n",
       "static PyMethodDef __pyx_fuse_2__pyx_mdef_46_cython_magic_749e2f06f11f9a32dbdfa8eae1a17ea3_7compute = {\"__pyx_fuse_2compute\", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_fuse_2__pyx_pw_46_cython_magic_749e2f06f11f9a32dbdfa8eae1a17ea3_7compute, METH_VARARGS|METH_KEYWORDS, 0};\n",
       "static PyObject *__pyx_fuse_2__pyx_pw_46_cython_magic_749e2f06f11f9a32dbdfa8eae1a17ea3_7compute(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {\n",
       "  __Pyx_memviewslice __pyx_v_array_1 = { 0, 0, { 0 }, { 0 }, { 0 } };\n",
       "  __Pyx_memviewslice __pyx_v_array_2 = { 0, 0, { 0 }, { 0 }, { 0 } };\n",
       "  double __pyx_v_a;\n",
       "  double __pyx_v_b;\n",
       "  double __pyx_v_c;\n",
       "  PyObject *__pyx_r = 0;\n",
       "  <span class='refnanny'>__Pyx_RefNannyDeclarations</span>\n",
       "  <span class='refnanny'>__Pyx_RefNannySetupContext</span>(\"compute (wrapper)\", 0);\n",
       "  {\n",
       "    static PyObject **__pyx_pyargnames[] = {&amp;__pyx_n_s_array_1,&amp;__pyx_n_s_array_2,&amp;__pyx_n_s_a,&amp;__pyx_n_s_b,&amp;__pyx_n_s_c,0};\n",
       "    PyObject* values[5] = {0,0,0,0,0};\n",
       "    if (unlikely(__pyx_kwds)) {\n",
       "      Py_ssize_t kw_args;\n",
       "      const Py_ssize_t pos_args = <span class='py_macro_api'>PyTuple_GET_SIZE</span>(__pyx_args);\n",
       "      switch (pos_args) {\n",
       "        case  5: values[4] = <span class='py_macro_api'>PyTuple_GET_ITEM</span>(__pyx_args, 4);\n",
       "        CYTHON_FALLTHROUGH;\n",
       "        case  4: values[3] = <span class='py_macro_api'>PyTuple_GET_ITEM</span>(__pyx_args, 3);\n",
       "        CYTHON_FALLTHROUGH;\n",
       "        case  3: values[2] = <span class='py_macro_api'>PyTuple_GET_ITEM</span>(__pyx_args, 2);\n",
       "        CYTHON_FALLTHROUGH;\n",
       "        case  2: values[1] = <span class='py_macro_api'>PyTuple_GET_ITEM</span>(__pyx_args, 1);\n",
       "        CYTHON_FALLTHROUGH;\n",
       "        case  1: values[0] = <span class='py_macro_api'>PyTuple_GET_ITEM</span>(__pyx_args, 0);\n",
       "        CYTHON_FALLTHROUGH;\n",
       "        case  0: break;\n",
       "        default: goto __pyx_L5_argtuple_error;\n",
       "      }\n",
       "      kw_args = <span class='py_c_api'>PyDict_Size</span>(__pyx_kwds);\n",
       "      switch (pos_args) {\n",
       "        case  0:\n",
       "        if (likely((values[0] = <span class='pyx_c_api'>__Pyx_PyDict_GetItemStr</span>(__pyx_kwds, __pyx_n_s_array_1)) != 0)) kw_args--;\n",
       "        else goto __pyx_L5_argtuple_error;\n",
       "        CYTHON_FALLTHROUGH;\n",
       "        case  1:\n",
       "        if (likely((values[1] = <span class='pyx_c_api'>__Pyx_PyDict_GetItemStr</span>(__pyx_kwds, __pyx_n_s_array_2)) != 0)) kw_args--;\n",
       "        else {\n",
       "          <span class='pyx_c_api'>__Pyx_RaiseArgtupleInvalid</span>(\"compute\", 1, 5, 5, 1); <span class='error_goto'>__PYX_ERR(0, 15, __pyx_L3_error)</span>\n",
       "        }\n",
       "        CYTHON_FALLTHROUGH;\n",
       "        case  2:\n",
       "        if (likely((values[2] = <span class='pyx_c_api'>__Pyx_PyDict_GetItemStr</span>(__pyx_kwds, __pyx_n_s_a)) != 0)) kw_args--;\n",
       "        else {\n",
       "          <span class='pyx_c_api'>__Pyx_RaiseArgtupleInvalid</span>(\"compute\", 1, 5, 5, 2); <span class='error_goto'>__PYX_ERR(0, 15, __pyx_L3_error)</span>\n",
       "        }\n",
       "        CYTHON_FALLTHROUGH;\n",
       "        case  3:\n",
       "        if (likely((values[3] = <span class='pyx_c_api'>__Pyx_PyDict_GetItemStr</span>(__pyx_kwds, __pyx_n_s_b)) != 0)) kw_args--;\n",
       "        else {\n",
       "          <span class='pyx_c_api'>__Pyx_RaiseArgtupleInvalid</span>(\"compute\", 1, 5, 5, 3); <span class='error_goto'>__PYX_ERR(0, 15, __pyx_L3_error)</span>\n",
       "        }\n",
       "        CYTHON_FALLTHROUGH;\n",
       "        case  4:\n",
       "        if (likely((values[4] = <span class='pyx_c_api'>__Pyx_PyDict_GetItemStr</span>(__pyx_kwds, __pyx_n_s_c)) != 0)) kw_args--;\n",
       "        else {\n",
       "          <span class='pyx_c_api'>__Pyx_RaiseArgtupleInvalid</span>(\"compute\", 1, 5, 5, 4); <span class='error_goto'>__PYX_ERR(0, 15, __pyx_L3_error)</span>\n",
       "        }\n",
       "      }\n",
       "      if (unlikely(kw_args &gt; 0)) {\n",
       "        if (unlikely(<span class='pyx_c_api'>__Pyx_ParseOptionalKeywords</span>(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, \"compute\") &lt; 0)) <span class='error_goto'>__PYX_ERR(0, 15, __pyx_L3_error)</span>\n",
       "      }\n",
       "    } else if (<span class='py_macro_api'>PyTuple_GET_SIZE</span>(__pyx_args) != 5) {\n",
       "      goto __pyx_L5_argtuple_error;\n",
       "    } else {\n",
       "      values[0] = <span class='py_macro_api'>PyTuple_GET_ITEM</span>(__pyx_args, 0);\n",
       "      values[1] = <span class='py_macro_api'>PyTuple_GET_ITEM</span>(__pyx_args, 1);\n",
       "      values[2] = <span class='py_macro_api'>PyTuple_GET_ITEM</span>(__pyx_args, 2);\n",
       "      values[3] = <span class='py_macro_api'>PyTuple_GET_ITEM</span>(__pyx_args, 3);\n",
       "      values[4] = <span class='py_macro_api'>PyTuple_GET_ITEM</span>(__pyx_args, 4);\n",
       "    }\n",
       "    __pyx_v_array_1 = <span class='pyx_c_api'>__Pyx_PyObject_to_MemoryviewSlice_d_dc_double</span>(values[0], PyBUF_WRITABLE);<span class='error_goto'> if (unlikely(!__pyx_v_array_1.memview)) __PYX_ERR(0, 15, __pyx_L3_error)</span>\n",
       "    __pyx_v_array_2 = <span class='pyx_c_api'>__Pyx_PyObject_to_MemoryviewSlice_d_dc_double</span>(values[1], PyBUF_WRITABLE);<span class='error_goto'> if (unlikely(!__pyx_v_array_2.memview)) __PYX_ERR(0, 15, __pyx_L3_error)</span>\n",
       "    __pyx_v_a = __pyx_<span class='py_c_api'>PyFloat_AsDouble</span>(values[2]); if (unlikely((__pyx_v_a == (double)-1) &amp;&amp; <span class='py_c_api'>PyErr_Occurred</span>())) <span class='error_goto'>__PYX_ERR(0, 15, __pyx_L3_error)</span>\n",
       "    __pyx_v_b = __pyx_<span class='py_c_api'>PyFloat_AsDouble</span>(values[3]); if (unlikely((__pyx_v_b == (double)-1) &amp;&amp; <span class='py_c_api'>PyErr_Occurred</span>())) <span class='error_goto'>__PYX_ERR(0, 15, __pyx_L3_error)</span>\n",
       "    __pyx_v_c = __pyx_<span class='py_c_api'>PyFloat_AsDouble</span>(values[4]); if (unlikely((__pyx_v_c == (double)-1) &amp;&amp; <span class='py_c_api'>PyErr_Occurred</span>())) <span class='error_goto'>__PYX_ERR(0, 15, __pyx_L3_error)</span>\n",
       "  }\n",
       "  goto __pyx_L4_argument_unpacking_done;\n",
       "  __pyx_L5_argtuple_error:;\n",
       "  <span class='pyx_c_api'>__Pyx_RaiseArgtupleInvalid</span>(\"compute\", 1, 5, 5, <span class='py_macro_api'>PyTuple_GET_SIZE</span>(__pyx_args)); <span class='error_goto'>__PYX_ERR(0, 15, __pyx_L3_error)</span>\n",
       "  __pyx_L3_error:;\n",
       "  <span class='pyx_c_api'>__Pyx_AddTraceback</span>(\"_cython_magic_749e2f06f11f9a32dbdfa8eae1a17ea3.compute\", __pyx_clineno, __pyx_lineno, __pyx_filename);\n",
       "  <span class='refnanny'>__Pyx_RefNannyFinishContext</span>();\n",
       "  return NULL;\n",
       "  __pyx_L4_argument_unpacking_done:;\n",
       "  __pyx_r = __pyx_pf_46_cython_magic_749e2f06f11f9a32dbdfa8eae1a17ea3_6compute(__pyx_self, __pyx_v_array_1, __pyx_v_array_2, __pyx_v_a, __pyx_v_b, __pyx_v_c);\n",
       "\n",
       "  /* function exit code */\n",
       "  <span class='refnanny'>__Pyx_RefNannyFinishContext</span>();\n",
       "  return __pyx_r;\n",
       "}\n",
       "\n",
       "static PyObject *__pyx_pf_46_cython_magic_749e2f06f11f9a32dbdfa8eae1a17ea3_6compute(CYTHON_UNUSED PyObject *__pyx_self, __Pyx_memviewslice __pyx_v_array_1, __Pyx_memviewslice __pyx_v_array_2, double __pyx_v_a, double __pyx_v_b, double __pyx_v_c) {\n",
       "  Py_ssize_t __pyx_v_x_max;\n",
       "  Py_ssize_t __pyx_v_y_max;\n",
       "  PyObject *__pyx_v_dtype = NULL;\n",
       "  PyObject *__pyx_v_result = NULL;\n",
       "  __Pyx_memviewslice __pyx_v_result_view = { 0, 0, { 0 }, { 0 }, { 0 } };\n",
       "  double __pyx_v_tmp;\n",
       "  Py_ssize_t __pyx_v_x;\n",
       "  Py_ssize_t __pyx_v_y;\n",
       "  PyObject *__pyx_r = NULL;\n",
       "  <span class='refnanny'>__Pyx_RefNannyDeclarations</span>\n",
       "  <span class='refnanny'>__Pyx_RefNannySetupContext</span>(\"__pyx_fuse_2compute\", 0);\n",
       "/* … */\n",
       "  /* function exit code */\n",
       "  __pyx_L1_error:;\n",
       "  <span class='pyx_macro_api'>__Pyx_XDECREF</span>(__pyx_t_1);\n",
       "  <span class='pyx_macro_api'>__Pyx_XDECREF</span>(__pyx_t_2);\n",
       "  <span class='pyx_macro_api'>__Pyx_XDECREF</span>(__pyx_t_3);\n",
       "  <span class='pyx_macro_api'>__Pyx_XDECREF</span>(__pyx_t_5);\n",
       "  __PYX_XDEC_MEMVIEW(&amp;__pyx_t_6, 1);\n",
       "  <span class='pyx_c_api'>__Pyx_AddTraceback</span>(\"_cython_magic_749e2f06f11f9a32dbdfa8eae1a17ea3.compute\", __pyx_clineno, __pyx_lineno, __pyx_filename);\n",
       "  __pyx_r = NULL;\n",
       "  __pyx_L0:;\n",
       "  <span class='pyx_macro_api'>__Pyx_XDECREF</span>(__pyx_v_dtype);\n",
       "  <span class='pyx_macro_api'>__Pyx_XDECREF</span>(__pyx_v_result);\n",
       "  __PYX_XDEC_MEMVIEW(&amp;__pyx_v_result_view, 1);\n",
       "  __PYX_XDEC_MEMVIEW(&amp;__pyx_v_array_1, 1);\n",
       "  __PYX_XDEC_MEMVIEW(&amp;__pyx_v_array_2, 1);\n",
       "  <span class='refnanny'>__Pyx_XGIVEREF</span>(__pyx_r);\n",
       "  <span class='refnanny'>__Pyx_RefNannyFinishContext</span>();\n",
       "  return __pyx_r;\n",
       "}\n",
       "  __pyx_tuple__4 = <span class='py_c_api'>PyTuple_Pack</span>(1, __pyx_kp_s_Function_call_with_ambiguous_arg);<span class='error_goto'> if (unlikely(!__pyx_tuple__4)) __PYX_ERR(0, 15, __pyx_L1_error)</span>\n",
       "  <span class='refnanny'>__Pyx_GOTREF</span>(__pyx_tuple__4);\n",
       "  <span class='refnanny'>__Pyx_GIVEREF</span>(__pyx_tuple__4);\n",
       "/* … */\n",
       "  __pyx_tuple__23 = <span class='py_c_api'>PyTuple_Pack</span>(13, __pyx_n_s_array_1, __pyx_n_s_array_2, __pyx_n_s_a, __pyx_n_s_b, __pyx_n_s_c, __pyx_n_s_x_max, __pyx_n_s_y_max, __pyx_n_s_dtype, __pyx_n_s_result, __pyx_n_s_result_view, __pyx_n_s_tmp, __pyx_n_s_x, __pyx_n_s_y);<span class='error_goto'> if (unlikely(!__pyx_tuple__23)) __PYX_ERR(0, 15, __pyx_L1_error)</span>\n",
       "  <span class='refnanny'>__Pyx_GOTREF</span>(__pyx_tuple__23);\n",
       "  <span class='refnanny'>__Pyx_GIVEREF</span>(__pyx_tuple__23);\n",
       "/* … */\n",
       "  __pyx_t_1 = <span class='pyx_c_api'>__Pyx_PyDict_NewPresized</span>(3);<span class='error_goto'> if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 15, __pyx_L1_error)</span>\n",
       "  <span class='refnanny'>__Pyx_GOTREF</span>(__pyx_t_1);\n",
       "  __pyx_t_2 = __pyx_FusedFunction_NewEx(&amp;__pyx_fuse_0__pyx_mdef_46_cython_magic_749e2f06f11f9a32dbdfa8eae1a17ea3_3compute, 0, __pyx_n_s_compute, NULL, __pyx_n_s_cython_magic_749e2f06f11f9a32db, __pyx_d, ((PyObject *)__pyx_codeobj__24));<span class='error_goto'> if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 15, __pyx_L1_error)</span>\n",
       "  <span class='refnanny'>__Pyx_GOTREF</span>(__pyx_t_2);\n",
       "  <span class='pyx_c_api'>__Pyx_CyFunction_SetDefaultsTuple</span>(__pyx_t_2, __pyx_empty_tuple);\n",
       "  if (<span class='py_c_api'>PyDict_SetItem</span>(__pyx_t_1, __pyx_n_s_int, __pyx_t_2) &lt; 0) <span class='error_goto'>__PYX_ERR(0, 15, __pyx_L1_error)</span>\n",
       "  <span class='pyx_macro_api'>__Pyx_DECREF</span>(__pyx_t_2); __pyx_t_2 = 0;\n",
       "  __pyx_t_2 = __pyx_FusedFunction_NewEx(&amp;__pyx_fuse_1__pyx_mdef_46_cython_magic_749e2f06f11f9a32dbdfa8eae1a17ea3_5compute, 0, __pyx_n_s_compute, NULL, __pyx_n_s_cython_magic_749e2f06f11f9a32db, __pyx_d, ((PyObject *)__pyx_codeobj__24));<span class='error_goto'> if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 15, __pyx_L1_error)</span>\n",
       "  <span class='refnanny'>__Pyx_GOTREF</span>(__pyx_t_2);\n",
       "  <span class='pyx_c_api'>__Pyx_CyFunction_SetDefaultsTuple</span>(__pyx_t_2, __pyx_empty_tuple);\n",
       "  if (<span class='py_c_api'>PyDict_SetItem</span>(__pyx_t_1, __pyx_n_s_float, __pyx_t_2) &lt; 0) <span class='error_goto'>__PYX_ERR(0, 15, __pyx_L1_error)</span>\n",
       "  <span class='pyx_macro_api'>__Pyx_DECREF</span>(__pyx_t_2); __pyx_t_2 = 0;\n",
       "  __pyx_t_2 = __pyx_FusedFunction_NewEx(&amp;__pyx_fuse_2__pyx_mdef_46_cython_magic_749e2f06f11f9a32dbdfa8eae1a17ea3_7compute, 0, __pyx_n_s_compute, NULL, __pyx_n_s_cython_magic_749e2f06f11f9a32db, __pyx_d, ((PyObject *)__pyx_codeobj__24));<span class='error_goto'> if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 15, __pyx_L1_error)</span>\n",
       "  <span class='refnanny'>__Pyx_GOTREF</span>(__pyx_t_2);\n",
       "  <span class='pyx_c_api'>__Pyx_CyFunction_SetDefaultsTuple</span>(__pyx_t_2, __pyx_empty_tuple);\n",
       "  if (<span class='py_c_api'>PyDict_SetItem</span>(__pyx_t_1, __pyx_n_s_double, __pyx_t_2) &lt; 0) <span class='error_goto'>__PYX_ERR(0, 15, __pyx_L1_error)</span>\n",
       "  <span class='pyx_macro_api'>__Pyx_DECREF</span>(__pyx_t_2); __pyx_t_2 = 0;\n",
       "  __pyx_t_2 = __pyx_FusedFunction_NewEx(&amp;__pyx_mdef_46_cython_magic_749e2f06f11f9a32dbdfa8eae1a17ea3_1compute, 0, __pyx_n_s_compute, NULL, __pyx_n_s_cython_magic_749e2f06f11f9a32db, __pyx_d, ((PyObject *)__pyx_codeobj__24));<span class='error_goto'> if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 15, __pyx_L1_error)</span>\n",
       "  <span class='refnanny'>__Pyx_GOTREF</span>(__pyx_t_2);\n",
       "  <span class='pyx_c_api'>__Pyx_CyFunction_SetDefaultsTuple</span>(__pyx_t_2, __pyx_empty_tuple);\n",
       "  ((__pyx_FusedFunctionObject *) __pyx_t_2)-&gt;__signatures__ = __pyx_t_1;\n",
       "  <span class='refnanny'>__Pyx_GIVEREF</span>(__pyx_t_1);\n",
       "  if (<span class='py_c_api'>PyDict_SetItem</span>(__pyx_d, __pyx_n_s_compute, __pyx_t_2) &lt; 0) <span class='error_goto'>__PYX_ERR(0, 15, __pyx_L1_error)</span>\n",
       "  <span class='pyx_macro_api'>__Pyx_DECREF</span>(__pyx_t_2); __pyx_t_2 = 0;\n",
       "  __pyx_codeobj__24 = (PyObject*)<span class='pyx_c_api'>__Pyx_PyCode_New</span>(5, 0, 13, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__23, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_Users_hrvvi_ipython_cython__cyt, __pyx_n_s_compute, 15, __pyx_empty_bytes);<span class='error_goto'> if (unlikely(!__pyx_codeobj__24)) __PYX_ERR(0, 15, __pyx_L1_error)</span>\n",
       "</pre><pre class=\"cython line score-0\">&#xA0;<span class=\"\">16</span>: </pre>\n",
       "<pre class=\"cython line score-0\" onclick=\"(function(s){s.display=s.display==='block'?'none':'block'})(this.nextElementSibling.style)\">+<span class=\"\">17</span>:     <span class=\"n\">x_max</span> <span class=\"o\">=</span> <span class=\"n\">array_1</span><span class=\"o\">.</span><span class=\"n\">shape</span><span class=\"p\">[</span><span class=\"mf\">0</span><span class=\"p\">]</span></pre>\n",
       "<pre class='cython code score-0 '>  __pyx_v_x_max = (__pyx_v_array_1.shape[0]);\n",
       "/* … */\n",
       "  __pyx_v_x_max = (__pyx_v_array_1.shape[0]);\n",
       "/* … */\n",
       "  __pyx_v_x_max = (__pyx_v_array_1.shape[0]);\n",
       "</pre><pre class=\"cython line score-0\" onclick=\"(function(s){s.display=s.display==='block'?'none':'block'})(this.nextElementSibling.style)\">+<span class=\"\">18</span>:     <span class=\"n\">y_max</span> <span class=\"o\">=</span> <span class=\"n\">array_1</span><span class=\"o\">.</span><span class=\"n\">shape</span><span class=\"p\">[</span><span class=\"mf\">1</span><span class=\"p\">]</span></pre>\n",
       "<pre class='cython code score-0 '>  __pyx_v_y_max = (__pyx_v_array_1.shape[1]);\n",
       "/* … */\n",
       "  __pyx_v_y_max = (__pyx_v_array_1.shape[1]);\n",
       "/* … */\n",
       "  __pyx_v_y_max = (__pyx_v_array_1.shape[1]);\n",
       "</pre><pre class=\"cython line score-0\">&#xA0;<span class=\"\">19</span>: </pre>\n",
       "<pre class=\"cython line score-63\" onclick=\"(function(s){s.display=s.display==='block'?'none':'block'})(this.nextElementSibling.style)\">+<span class=\"\">20</span>:     <span class=\"k\">assert</span> <span class=\"nb\">tuple</span><span class=\"p\">(</span><span class=\"n\">array_1</span><span class=\"o\">.</span><span class=\"n\">shape</span><span class=\"p\">)</span> <span class=\"o\">==</span> <span class=\"nb\">tuple</span><span class=\"p\">(</span><span class=\"n\">array_2</span><span class=\"o\">.</span><span class=\"n\">shape</span><span class=\"p\">)</span></pre>\n",
       "<pre class='cython code score-63 '>  #ifndef CYTHON_WITHOUT_ASSERTIONS\n",
       "  if (unlikely(!Py_OptimizeFlag)) {\n",
       "    __pyx_t_1 = __Pyx_carray_to_py_Py_ssize_t(__pyx_v_array_1.shape, 8);<span class='error_goto'> if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 20, __pyx_L1_error)</span>\n",
       "    <span class='refnanny'>__Pyx_GOTREF</span>(__pyx_t_1);\n",
       "    __pyx_t_2 = <span class='pyx_c_api'>__Pyx_PySequence_Tuple</span>(__pyx_t_1);<span class='error_goto'> if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 20, __pyx_L1_error)</span>\n",
       "    <span class='refnanny'>__Pyx_GOTREF</span>(__pyx_t_2);\n",
       "    <span class='pyx_macro_api'>__Pyx_DECREF</span>(__pyx_t_1); __pyx_t_1 = 0;\n",
       "    __pyx_t_1 = __Pyx_carray_to_py_Py_ssize_t(__pyx_v_array_2.shape, 8);<span class='error_goto'> if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 20, __pyx_L1_error)</span>\n",
       "    <span class='refnanny'>__Pyx_GOTREF</span>(__pyx_t_1);\n",
       "    __pyx_t_3 = <span class='pyx_c_api'>__Pyx_PySequence_Tuple</span>(__pyx_t_1);<span class='error_goto'> if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 20, __pyx_L1_error)</span>\n",
       "    <span class='refnanny'>__Pyx_GOTREF</span>(__pyx_t_3);\n",
       "    <span class='pyx_macro_api'>__Pyx_DECREF</span>(__pyx_t_1); __pyx_t_1 = 0;\n",
       "    __pyx_t_1 = <span class='py_c_api'>PyObject_RichCompare</span>(__pyx_t_2, __pyx_t_3, Py_EQ); <span class='refnanny'>__Pyx_XGOTREF</span>(__pyx_t_1);<span class='error_goto'> if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 20, __pyx_L1_error)</span>\n",
       "    <span class='pyx_macro_api'>__Pyx_DECREF</span>(__pyx_t_2); __pyx_t_2 = 0;\n",
       "    <span class='pyx_macro_api'>__Pyx_DECREF</span>(__pyx_t_3); __pyx_t_3 = 0;\n",
       "    __pyx_t_4 = <span class='pyx_c_api'>__Pyx_PyObject_IsTrue</span>(__pyx_t_1); if (unlikely(__pyx_t_4 &lt; 0)) <span class='error_goto'>__PYX_ERR(0, 20, __pyx_L1_error)</span>\n",
       "    <span class='pyx_macro_api'>__Pyx_DECREF</span>(__pyx_t_1); __pyx_t_1 = 0;\n",
       "    if (unlikely(!__pyx_t_4)) {\n",
       "      <span class='py_c_api'>PyErr_SetNone</span>(PyExc_AssertionError);\n",
       "      <span class='error_goto'>__PYX_ERR(0, 20, __pyx_L1_error)</span>\n",
       "    }\n",
       "  }\n",
       "  #endif\n",
       "/* … */\n",
       "  #ifndef CYTHON_WITHOUT_ASSERTIONS\n",
       "  if (unlikely(!Py_OptimizeFlag)) {\n",
       "    __pyx_t_1 = __Pyx_carray_to_py_Py_ssize_t(__pyx_v_array_1.shape, 8);<span class='error_goto'> if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 20, __pyx_L1_error)</span>\n",
       "    <span class='refnanny'>__Pyx_GOTREF</span>(__pyx_t_1);\n",
       "    __pyx_t_2 = <span class='pyx_c_api'>__Pyx_PySequence_Tuple</span>(__pyx_t_1);<span class='error_goto'> if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 20, __pyx_L1_error)</span>\n",
       "    <span class='refnanny'>__Pyx_GOTREF</span>(__pyx_t_2);\n",
       "    <span class='pyx_macro_api'>__Pyx_DECREF</span>(__pyx_t_1); __pyx_t_1 = 0;\n",
       "    __pyx_t_1 = __Pyx_carray_to_py_Py_ssize_t(__pyx_v_array_2.shape, 8);<span class='error_goto'> if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 20, __pyx_L1_error)</span>\n",
       "    <span class='refnanny'>__Pyx_GOTREF</span>(__pyx_t_1);\n",
       "    __pyx_t_3 = <span class='pyx_c_api'>__Pyx_PySequence_Tuple</span>(__pyx_t_1);<span class='error_goto'> if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 20, __pyx_L1_error)</span>\n",
       "    <span class='refnanny'>__Pyx_GOTREF</span>(__pyx_t_3);\n",
       "    <span class='pyx_macro_api'>__Pyx_DECREF</span>(__pyx_t_1); __pyx_t_1 = 0;\n",
       "    __pyx_t_1 = <span class='py_c_api'>PyObject_RichCompare</span>(__pyx_t_2, __pyx_t_3, Py_EQ); <span class='refnanny'>__Pyx_XGOTREF</span>(__pyx_t_1);<span class='error_goto'> if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 20, __pyx_L1_error)</span>\n",
       "    <span class='pyx_macro_api'>__Pyx_DECREF</span>(__pyx_t_2); __pyx_t_2 = 0;\n",
       "    <span class='pyx_macro_api'>__Pyx_DECREF</span>(__pyx_t_3); __pyx_t_3 = 0;\n",
       "    __pyx_t_4 = <span class='pyx_c_api'>__Pyx_PyObject_IsTrue</span>(__pyx_t_1); if (unlikely(__pyx_t_4 &lt; 0)) <span class='error_goto'>__PYX_ERR(0, 20, __pyx_L1_error)</span>\n",
       "    <span class='pyx_macro_api'>__Pyx_DECREF</span>(__pyx_t_1); __pyx_t_1 = 0;\n",
       "    if (unlikely(!__pyx_t_4)) {\n",
       "      <span class='py_c_api'>PyErr_SetNone</span>(PyExc_AssertionError);\n",
       "      <span class='error_goto'>__PYX_ERR(0, 20, __pyx_L1_error)</span>\n",
       "    }\n",
       "  }\n",
       "  #endif\n",
       "/* … */\n",
       "  #ifndef CYTHON_WITHOUT_ASSERTIONS\n",
       "  if (unlikely(!Py_OptimizeFlag)) {\n",
       "    __pyx_t_1 = __Pyx_carray_to_py_Py_ssize_t(__pyx_v_array_1.shape, 8);<span class='error_goto'> if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 20, __pyx_L1_error)</span>\n",
       "    <span class='refnanny'>__Pyx_GOTREF</span>(__pyx_t_1);\n",
       "    __pyx_t_2 = <span class='pyx_c_api'>__Pyx_PySequence_Tuple</span>(__pyx_t_1);<span class='error_goto'> if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 20, __pyx_L1_error)</span>\n",
       "    <span class='refnanny'>__Pyx_GOTREF</span>(__pyx_t_2);\n",
       "    <span class='pyx_macro_api'>__Pyx_DECREF</span>(__pyx_t_1); __pyx_t_1 = 0;\n",
       "    __pyx_t_1 = __Pyx_carray_to_py_Py_ssize_t(__pyx_v_array_2.shape, 8);<span class='error_goto'> if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 20, __pyx_L1_error)</span>\n",
       "    <span class='refnanny'>__Pyx_GOTREF</span>(__pyx_t_1);\n",
       "    __pyx_t_3 = <span class='pyx_c_api'>__Pyx_PySequence_Tuple</span>(__pyx_t_1);<span class='error_goto'> if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 20, __pyx_L1_error)</span>\n",
       "    <span class='refnanny'>__Pyx_GOTREF</span>(__pyx_t_3);\n",
       "    <span class='pyx_macro_api'>__Pyx_DECREF</span>(__pyx_t_1); __pyx_t_1 = 0;\n",
       "    __pyx_t_1 = <span class='py_c_api'>PyObject_RichCompare</span>(__pyx_t_2, __pyx_t_3, Py_EQ); <span class='refnanny'>__Pyx_XGOTREF</span>(__pyx_t_1);<span class='error_goto'> if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 20, __pyx_L1_error)</span>\n",
       "    <span class='pyx_macro_api'>__Pyx_DECREF</span>(__pyx_t_2); __pyx_t_2 = 0;\n",
       "    <span class='pyx_macro_api'>__Pyx_DECREF</span>(__pyx_t_3); __pyx_t_3 = 0;\n",
       "    __pyx_t_4 = <span class='pyx_c_api'>__Pyx_PyObject_IsTrue</span>(__pyx_t_1); if (unlikely(__pyx_t_4 &lt; 0)) <span class='error_goto'>__PYX_ERR(0, 20, __pyx_L1_error)</span>\n",
       "    <span class='pyx_macro_api'>__Pyx_DECREF</span>(__pyx_t_1); __pyx_t_1 = 0;\n",
       "    if (unlikely(!__pyx_t_4)) {\n",
       "      <span class='py_c_api'>PyErr_SetNone</span>(PyExc_AssertionError);\n",
       "      <span class='error_goto'>__PYX_ERR(0, 20, __pyx_L1_error)</span>\n",
       "    }\n",
       "  }\n",
       "  #endif\n",
       "</pre><pre class=\"cython line score-0\">&#xA0;<span class=\"\">21</span>: </pre>\n",
       "<pre class=\"cython line score-0\">&#xA0;<span class=\"\">22</span>:     <span class=\"k\">if</span> <span class=\"n\">scalar_t</span> <span class=\"ow\">is</span> <span class=\"nb\">int</span><span class=\"p\">:</span></pre>\n",
       "<pre class=\"cython line score-5\" onclick=\"(function(s){s.display=s.display==='block'?'none':'block'})(this.nextElementSibling.style)\">+<span class=\"\">23</span>:         <span class=\"n\">dtype</span> <span class=\"o\">=</span> <span class=\"n\">np</span><span class=\"o\">.</span><span class=\"n\">intc</span></pre>\n",
       "<pre class='cython code score-5 '>  <span class='pyx_c_api'>__Pyx_GetModuleGlobalName</span>(__pyx_t_1, __pyx_n_s_np);<span class='error_goto'> if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 23, __pyx_L1_error)</span>\n",
       "  <span class='refnanny'>__Pyx_GOTREF</span>(__pyx_t_1);\n",
       "  __pyx_t_3 = <span class='pyx_c_api'>__Pyx_PyObject_GetAttrStr</span>(__pyx_t_1, __pyx_n_s_intc);<span class='error_goto'> if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 23, __pyx_L1_error)</span>\n",
       "  <span class='refnanny'>__Pyx_GOTREF</span>(__pyx_t_3);\n",
       "  <span class='pyx_macro_api'>__Pyx_DECREF</span>(__pyx_t_1); __pyx_t_1 = 0;\n",
       "  __pyx_v_dtype = __pyx_t_3;\n",
       "  __pyx_t_3 = 0;\n",
       "</pre><pre class=\"cython line score-0\">&#xA0;<span class=\"\">24</span>:     <span class=\"k\">elif</span> <span class=\"n\">scalar_t</span> <span class=\"ow\">is</span> <span class=\"nb\">float</span><span class=\"p\">:</span></pre>\n",
       "<pre class=\"cython line score-5\" onclick=\"(function(s){s.display=s.display==='block'?'none':'block'})(this.nextElementSibling.style)\">+<span class=\"\">25</span>:         <span class=\"n\">dtype</span> <span class=\"o\">=</span> <span class=\"n\">np</span><span class=\"o\">.</span><span class=\"n\">float</span></pre>\n",
       "<pre class='cython code score-5 '>  <span class='pyx_c_api'>__Pyx_GetModuleGlobalName</span>(__pyx_t_1, __pyx_n_s_np);<span class='error_goto'> if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 25, __pyx_L1_error)</span>\n",
       "  <span class='refnanny'>__Pyx_GOTREF</span>(__pyx_t_1);\n",
       "  __pyx_t_3 = <span class='pyx_c_api'>__Pyx_PyObject_GetAttrStr</span>(__pyx_t_1, __pyx_n_s_float);<span class='error_goto'> if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 25, __pyx_L1_error)</span>\n",
       "  <span class='refnanny'>__Pyx_GOTREF</span>(__pyx_t_3);\n",
       "  <span class='pyx_macro_api'>__Pyx_DECREF</span>(__pyx_t_1); __pyx_t_1 = 0;\n",
       "  __pyx_v_dtype = __pyx_t_3;\n",
       "  __pyx_t_3 = 0;\n",
       "</pre><pre class=\"cython line score-0\">&#xA0;<span class=\"\">26</span>:     <span class=\"k\">elif</span> <span class=\"n\">scalar_t</span> <span class=\"ow\">is</span> <span class=\"n\">double</span><span class=\"p\">:</span></pre>\n",
       "<pre class=\"cython line score-5\" onclick=\"(function(s){s.display=s.display==='block'?'none':'block'})(this.nextElementSibling.style)\">+<span class=\"\">27</span>:         <span class=\"n\">dtype</span> <span class=\"o\">=</span> <span class=\"n\">np</span><span class=\"o\">.</span><span class=\"n\">double</span></pre>\n",
       "<pre class='cython code score-5 '>  <span class='pyx_c_api'>__Pyx_GetModuleGlobalName</span>(__pyx_t_1, __pyx_n_s_np);<span class='error_goto'> if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 27, __pyx_L1_error)</span>\n",
       "  <span class='refnanny'>__Pyx_GOTREF</span>(__pyx_t_1);\n",
       "  __pyx_t_3 = <span class='pyx_c_api'>__Pyx_PyObject_GetAttrStr</span>(__pyx_t_1, __pyx_n_s_double);<span class='error_goto'> if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 27, __pyx_L1_error)</span>\n",
       "  <span class='refnanny'>__Pyx_GOTREF</span>(__pyx_t_3);\n",
       "  <span class='pyx_macro_api'>__Pyx_DECREF</span>(__pyx_t_1); __pyx_t_1 = 0;\n",
       "  __pyx_v_dtype = __pyx_t_3;\n",
       "  __pyx_t_3 = 0;\n",
       "</pre><pre class=\"cython line score-0\">&#xA0;<span class=\"\">28</span>: </pre>\n",
       "<pre class=\"cython line score-120\" onclick=\"(function(s){s.display=s.display==='block'?'none':'block'})(this.nextElementSibling.style)\">+<span class=\"\">29</span>:     <span class=\"n\">result</span> <span class=\"o\">=</span> <span class=\"n\">np</span><span class=\"o\">.</span><span class=\"n\">zeros</span><span class=\"p\">((</span><span class=\"n\">x_max</span><span class=\"p\">,</span> <span class=\"n\">y_max</span><span class=\"p\">),</span> <span class=\"n\">dtype</span><span class=\"o\">=</span><span class=\"n\">dtype</span><span class=\"p\">)</span></pre>\n",
       "<pre class='cython code score-120 '>  <span class='pyx_c_api'>__Pyx_GetModuleGlobalName</span>(__pyx_t_3, __pyx_n_s_np);<span class='error_goto'> if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 29, __pyx_L1_error)</span>\n",
       "  <span class='refnanny'>__Pyx_GOTREF</span>(__pyx_t_3);\n",
       "  __pyx_t_1 = <span class='pyx_c_api'>__Pyx_PyObject_GetAttrStr</span>(__pyx_t_3, __pyx_n_s_zeros);<span class='error_goto'> if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 29, __pyx_L1_error)</span>\n",
       "  <span class='refnanny'>__Pyx_GOTREF</span>(__pyx_t_1);\n",
       "  <span class='pyx_macro_api'>__Pyx_DECREF</span>(__pyx_t_3); __pyx_t_3 = 0;\n",
       "  __pyx_t_3 = <span class='py_c_api'>PyInt_FromSsize_t</span>(__pyx_v_x_max);<span class='error_goto'> if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 29, __pyx_L1_error)</span>\n",
       "  <span class='refnanny'>__Pyx_GOTREF</span>(__pyx_t_3);\n",
       "  __pyx_t_2 = <span class='py_c_api'>PyInt_FromSsize_t</span>(__pyx_v_y_max);<span class='error_goto'> if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 29, __pyx_L1_error)</span>\n",
       "  <span class='refnanny'>__Pyx_GOTREF</span>(__pyx_t_2);\n",
       "  __pyx_t_5 = <span class='py_c_api'>PyTuple_New</span>(2);<span class='error_goto'> if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 29, __pyx_L1_error)</span>\n",
       "  <span class='refnanny'>__Pyx_GOTREF</span>(__pyx_t_5);\n",
       "  <span class='refnanny'>__Pyx_GIVEREF</span>(__pyx_t_3);\n",
       "  <span class='py_macro_api'>PyTuple_SET_ITEM</span>(__pyx_t_5, 0, __pyx_t_3);\n",
       "  <span class='refnanny'>__Pyx_GIVEREF</span>(__pyx_t_2);\n",
       "  <span class='py_macro_api'>PyTuple_SET_ITEM</span>(__pyx_t_5, 1, __pyx_t_2);\n",
       "  __pyx_t_3 = 0;\n",
       "  __pyx_t_2 = 0;\n",
       "  __pyx_t_2 = <span class='py_c_api'>PyTuple_New</span>(1);<span class='error_goto'> if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 29, __pyx_L1_error)</span>\n",
       "  <span class='refnanny'>__Pyx_GOTREF</span>(__pyx_t_2);\n",
       "  <span class='refnanny'>__Pyx_GIVEREF</span>(__pyx_t_5);\n",
       "  <span class='py_macro_api'>PyTuple_SET_ITEM</span>(__pyx_t_2, 0, __pyx_t_5);\n",
       "  __pyx_t_5 = 0;\n",
       "  __pyx_t_5 = <span class='pyx_c_api'>__Pyx_PyDict_NewPresized</span>(1);<span class='error_goto'> if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 29, __pyx_L1_error)</span>\n",
       "  <span class='refnanny'>__Pyx_GOTREF</span>(__pyx_t_5);\n",
       "  if (<span class='py_c_api'>PyDict_SetItem</span>(__pyx_t_5, __pyx_n_s_dtype, __pyx_v_dtype) &lt; 0) <span class='error_goto'>__PYX_ERR(0, 29, __pyx_L1_error)</span>\n",
       "  __pyx_t_3 = <span class='pyx_c_api'>__Pyx_PyObject_Call</span>(__pyx_t_1, __pyx_t_2, __pyx_t_5);<span class='error_goto'> if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 29, __pyx_L1_error)</span>\n",
       "  <span class='refnanny'>__Pyx_GOTREF</span>(__pyx_t_3);\n",
       "  <span class='pyx_macro_api'>__Pyx_DECREF</span>(__pyx_t_1); __pyx_t_1 = 0;\n",
       "  <span class='pyx_macro_api'>__Pyx_DECREF</span>(__pyx_t_2); __pyx_t_2 = 0;\n",
       "  <span class='pyx_macro_api'>__Pyx_DECREF</span>(__pyx_t_5); __pyx_t_5 = 0;\n",
       "  __pyx_v_result = __pyx_t_3;\n",
       "  __pyx_t_3 = 0;\n",
       "/* … */\n",
       "  <span class='pyx_c_api'>__Pyx_GetModuleGlobalName</span>(__pyx_t_3, __pyx_n_s_np);<span class='error_goto'> if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 29, __pyx_L1_error)</span>\n",
       "  <span class='refnanny'>__Pyx_GOTREF</span>(__pyx_t_3);\n",
       "  __pyx_t_1 = <span class='pyx_c_api'>__Pyx_PyObject_GetAttrStr</span>(__pyx_t_3, __pyx_n_s_zeros);<span class='error_goto'> if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 29, __pyx_L1_error)</span>\n",
       "  <span class='refnanny'>__Pyx_GOTREF</span>(__pyx_t_1);\n",
       "  <span class='pyx_macro_api'>__Pyx_DECREF</span>(__pyx_t_3); __pyx_t_3 = 0;\n",
       "  __pyx_t_3 = <span class='py_c_api'>PyInt_FromSsize_t</span>(__pyx_v_x_max);<span class='error_goto'> if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 29, __pyx_L1_error)</span>\n",
       "  <span class='refnanny'>__Pyx_GOTREF</span>(__pyx_t_3);\n",
       "  __pyx_t_2 = <span class='py_c_api'>PyInt_FromSsize_t</span>(__pyx_v_y_max);<span class='error_goto'> if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 29, __pyx_L1_error)</span>\n",
       "  <span class='refnanny'>__Pyx_GOTREF</span>(__pyx_t_2);\n",
       "  __pyx_t_5 = <span class='py_c_api'>PyTuple_New</span>(2);<span class='error_goto'> if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 29, __pyx_L1_error)</span>\n",
       "  <span class='refnanny'>__Pyx_GOTREF</span>(__pyx_t_5);\n",
       "  <span class='refnanny'>__Pyx_GIVEREF</span>(__pyx_t_3);\n",
       "  <span class='py_macro_api'>PyTuple_SET_ITEM</span>(__pyx_t_5, 0, __pyx_t_3);\n",
       "  <span class='refnanny'>__Pyx_GIVEREF</span>(__pyx_t_2);\n",
       "  <span class='py_macro_api'>PyTuple_SET_ITEM</span>(__pyx_t_5, 1, __pyx_t_2);\n",
       "  __pyx_t_3 = 0;\n",
       "  __pyx_t_2 = 0;\n",
       "  __pyx_t_2 = <span class='py_c_api'>PyTuple_New</span>(1);<span class='error_goto'> if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 29, __pyx_L1_error)</span>\n",
       "  <span class='refnanny'>__Pyx_GOTREF</span>(__pyx_t_2);\n",
       "  <span class='refnanny'>__Pyx_GIVEREF</span>(__pyx_t_5);\n",
       "  <span class='py_macro_api'>PyTuple_SET_ITEM</span>(__pyx_t_2, 0, __pyx_t_5);\n",
       "  __pyx_t_5 = 0;\n",
       "  __pyx_t_5 = <span class='pyx_c_api'>__Pyx_PyDict_NewPresized</span>(1);<span class='error_goto'> if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 29, __pyx_L1_error)</span>\n",
       "  <span class='refnanny'>__Pyx_GOTREF</span>(__pyx_t_5);\n",
       "  if (<span class='py_c_api'>PyDict_SetItem</span>(__pyx_t_5, __pyx_n_s_dtype, __pyx_v_dtype) &lt; 0) <span class='error_goto'>__PYX_ERR(0, 29, __pyx_L1_error)</span>\n",
       "  __pyx_t_3 = <span class='pyx_c_api'>__Pyx_PyObject_Call</span>(__pyx_t_1, __pyx_t_2, __pyx_t_5);<span class='error_goto'> if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 29, __pyx_L1_error)</span>\n",
       "  <span class='refnanny'>__Pyx_GOTREF</span>(__pyx_t_3);\n",
       "  <span class='pyx_macro_api'>__Pyx_DECREF</span>(__pyx_t_1); __pyx_t_1 = 0;\n",
       "  <span class='pyx_macro_api'>__Pyx_DECREF</span>(__pyx_t_2); __pyx_t_2 = 0;\n",
       "  <span class='pyx_macro_api'>__Pyx_DECREF</span>(__pyx_t_5); __pyx_t_5 = 0;\n",
       "  __pyx_v_result = __pyx_t_3;\n",
       "  __pyx_t_3 = 0;\n",
       "/* … */\n",
       "  <span class='pyx_c_api'>__Pyx_GetModuleGlobalName</span>(__pyx_t_3, __pyx_n_s_np);<span class='error_goto'> if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 29, __pyx_L1_error)</span>\n",
       "  <span class='refnanny'>__Pyx_GOTREF</span>(__pyx_t_3);\n",
       "  __pyx_t_1 = <span class='pyx_c_api'>__Pyx_PyObject_GetAttrStr</span>(__pyx_t_3, __pyx_n_s_zeros);<span class='error_goto'> if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 29, __pyx_L1_error)</span>\n",
       "  <span class='refnanny'>__Pyx_GOTREF</span>(__pyx_t_1);\n",
       "  <span class='pyx_macro_api'>__Pyx_DECREF</span>(__pyx_t_3); __pyx_t_3 = 0;\n",
       "  __pyx_t_3 = <span class='py_c_api'>PyInt_FromSsize_t</span>(__pyx_v_x_max);<span class='error_goto'> if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 29, __pyx_L1_error)</span>\n",
       "  <span class='refnanny'>__Pyx_GOTREF</span>(__pyx_t_3);\n",
       "  __pyx_t_2 = <span class='py_c_api'>PyInt_FromSsize_t</span>(__pyx_v_y_max);<span class='error_goto'> if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 29, __pyx_L1_error)</span>\n",
       "  <span class='refnanny'>__Pyx_GOTREF</span>(__pyx_t_2);\n",
       "  __pyx_t_5 = <span class='py_c_api'>PyTuple_New</span>(2);<span class='error_goto'> if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 29, __pyx_L1_error)</span>\n",
       "  <span class='refnanny'>__Pyx_GOTREF</span>(__pyx_t_5);\n",
       "  <span class='refnanny'>__Pyx_GIVEREF</span>(__pyx_t_3);\n",
       "  <span class='py_macro_api'>PyTuple_SET_ITEM</span>(__pyx_t_5, 0, __pyx_t_3);\n",
       "  <span class='refnanny'>__Pyx_GIVEREF</span>(__pyx_t_2);\n",
       "  <span class='py_macro_api'>PyTuple_SET_ITEM</span>(__pyx_t_5, 1, __pyx_t_2);\n",
       "  __pyx_t_3 = 0;\n",
       "  __pyx_t_2 = 0;\n",
       "  __pyx_t_2 = <span class='py_c_api'>PyTuple_New</span>(1);<span class='error_goto'> if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 29, __pyx_L1_error)</span>\n",
       "  <span class='refnanny'>__Pyx_GOTREF</span>(__pyx_t_2);\n",
       "  <span class='refnanny'>__Pyx_GIVEREF</span>(__pyx_t_5);\n",
       "  <span class='py_macro_api'>PyTuple_SET_ITEM</span>(__pyx_t_2, 0, __pyx_t_5);\n",
       "  __pyx_t_5 = 0;\n",
       "  __pyx_t_5 = <span class='pyx_c_api'>__Pyx_PyDict_NewPresized</span>(1);<span class='error_goto'> if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 29, __pyx_L1_error)</span>\n",
       "  <span class='refnanny'>__Pyx_GOTREF</span>(__pyx_t_5);\n",
       "  if (<span class='py_c_api'>PyDict_SetItem</span>(__pyx_t_5, __pyx_n_s_dtype, __pyx_v_dtype) &lt; 0) <span class='error_goto'>__PYX_ERR(0, 29, __pyx_L1_error)</span>\n",
       "  __pyx_t_3 = <span class='pyx_c_api'>__Pyx_PyObject_Call</span>(__pyx_t_1, __pyx_t_2, __pyx_t_5);<span class='error_goto'> if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 29, __pyx_L1_error)</span>\n",
       "  <span class='refnanny'>__Pyx_GOTREF</span>(__pyx_t_3);\n",
       "  <span class='pyx_macro_api'>__Pyx_DECREF</span>(__pyx_t_1); __pyx_t_1 = 0;\n",
       "  <span class='pyx_macro_api'>__Pyx_DECREF</span>(__pyx_t_2); __pyx_t_2 = 0;\n",
       "  <span class='pyx_macro_api'>__Pyx_DECREF</span>(__pyx_t_5); __pyx_t_5 = 0;\n",
       "  __pyx_v_result = __pyx_t_3;\n",
       "  __pyx_t_3 = 0;\n",
       "</pre><pre class=\"cython line score-6\" onclick=\"(function(s){s.display=s.display==='block'?'none':'block'})(this.nextElementSibling.style)\">+<span class=\"\">30</span>:     <span class=\"k\">cdef</span> <span class=\"kt\">scalar_t</span>[<span class=\"p\">:,</span> <span class=\"p\">::</span><span class=\"mf\">1</span><span class=\"p\">]</span> <span class=\"n\">result_view</span> <span class=\"o\">=</span> <span class=\"n\">result</span></pre>\n",
       "<pre class='cython code score-6 '>  __pyx_t_6 = <span class='pyx_c_api'>__Pyx_PyObject_to_MemoryviewSlice_d_dc_int</span>(__pyx_v_result, PyBUF_WRITABLE);<span class='error_goto'> if (unlikely(!__pyx_t_6.memview)) __PYX_ERR(0, 30, __pyx_L1_error)</span>\n",
       "  __pyx_v_result_view = __pyx_t_6;\n",
       "  __pyx_t_6.memview = NULL;\n",
       "  __pyx_t_6.data = NULL;\n",
       "/* … */\n",
       "  __pyx_t_6 = <span class='pyx_c_api'>__Pyx_PyObject_to_MemoryviewSlice_d_dc_float</span>(__pyx_v_result, PyBUF_WRITABLE);<span class='error_goto'> if (unlikely(!__pyx_t_6.memview)) __PYX_ERR(0, 30, __pyx_L1_error)</span>\n",
       "  __pyx_v_result_view = __pyx_t_6;\n",
       "  __pyx_t_6.memview = NULL;\n",
       "  __pyx_t_6.data = NULL;\n",
       "/* … */\n",
       "  __pyx_t_6 = <span class='pyx_c_api'>__Pyx_PyObject_to_MemoryviewSlice_d_dc_double</span>(__pyx_v_result, PyBUF_WRITABLE);<span class='error_goto'> if (unlikely(!__pyx_t_6.memview)) __PYX_ERR(0, 30, __pyx_L1_error)</span>\n",
       "  __pyx_v_result_view = __pyx_t_6;\n",
       "  __pyx_t_6.memview = NULL;\n",
       "  __pyx_t_6.data = NULL;\n",
       "</pre><pre class=\"cython line score-0\">&#xA0;<span class=\"\">31</span>: </pre>\n",
       "<pre class=\"cython line score-0\">&#xA0;<span class=\"\">32</span>:     <span class=\"k\">cdef</span> <span class=\"kt\">scalar_t</span> <span class=\"nf\">tmp</span></pre>\n",
       "<pre class=\"cython line score-0\">&#xA0;<span class=\"\">33</span>:     <span class=\"k\">cdef</span> <span class=\"kt\">Py_ssize_t</span> <span class=\"nf\">x</span><span class=\"p\">,</span> <span class=\"nf\">y</span></pre>\n",
       "<pre class=\"cython line score-0\">&#xA0;<span class=\"\">34</span>: </pre>\n",
       "<pre class=\"cython line score-0\" onclick=\"(function(s){s.display=s.display==='block'?'none':'block'})(this.nextElementSibling.style)\">+<span class=\"\">35</span>:     <span class=\"k\">for</span> <span class=\"n\">x</span> <span class=\"ow\">in</span> <span class=\"nb\">range</span><span class=\"p\">(</span><span class=\"n\">x_max</span><span class=\"p\">):</span></pre>\n",
       "<pre class='cython code score-0 '>  __pyx_t_7 = __pyx_v_x_max;\n",
       "  __pyx_t_8 = __pyx_t_7;\n",
       "  for (__pyx_t_9 = 0; __pyx_t_9 &lt; __pyx_t_8; __pyx_t_9+=1) {\n",
       "    __pyx_v_x = __pyx_t_9;\n",
       "/* … */\n",
       "  __pyx_t_7 = __pyx_v_x_max;\n",
       "  __pyx_t_8 = __pyx_t_7;\n",
       "  for (__pyx_t_9 = 0; __pyx_t_9 &lt; __pyx_t_8; __pyx_t_9+=1) {\n",
       "    __pyx_v_x = __pyx_t_9;\n",
       "/* … */\n",
       "  __pyx_t_7 = __pyx_v_x_max;\n",
       "  __pyx_t_8 = __pyx_t_7;\n",
       "  for (__pyx_t_9 = 0; __pyx_t_9 &lt; __pyx_t_8; __pyx_t_9+=1) {\n",
       "    __pyx_v_x = __pyx_t_9;\n",
       "</pre><pre class=\"cython line score-0\" onclick=\"(function(s){s.display=s.display==='block'?'none':'block'})(this.nextElementSibling.style)\">+<span class=\"\">36</span>:         <span class=\"k\">for</span> <span class=\"n\">y</span> <span class=\"ow\">in</span> <span class=\"nb\">range</span><span class=\"p\">(</span><span class=\"n\">y_max</span><span class=\"p\">):</span></pre>\n",
       "<pre class='cython code score-0 '>    __pyx_t_10 = __pyx_v_y_max;\n",
       "    __pyx_t_11 = __pyx_t_10;\n",
       "    for (__pyx_t_12 = 0; __pyx_t_12 &lt; __pyx_t_11; __pyx_t_12+=1) {\n",
       "      __pyx_v_y = __pyx_t_12;\n",
       "/* … */\n",
       "    __pyx_t_10 = __pyx_v_y_max;\n",
       "    __pyx_t_11 = __pyx_t_10;\n",
       "    for (__pyx_t_12 = 0; __pyx_t_12 &lt; __pyx_t_11; __pyx_t_12+=1) {\n",
       "      __pyx_v_y = __pyx_t_12;\n",
       "/* … */\n",
       "    __pyx_t_10 = __pyx_v_y_max;\n",
       "    __pyx_t_11 = __pyx_t_10;\n",
       "    for (__pyx_t_12 = 0; __pyx_t_12 &lt; __pyx_t_11; __pyx_t_12+=1) {\n",
       "      __pyx_v_y = __pyx_t_12;\n",
       "</pre><pre class=\"cython line score-0\">&#xA0;<span class=\"\">37</span>: </pre>\n",
       "<pre class=\"cython line score-0\" onclick=\"(function(s){s.display=s.display==='block'?'none':'block'})(this.nextElementSibling.style)\">+<span class=\"\">38</span>:             <span class=\"n\">tmp</span> <span class=\"o\">=</span> <span class=\"n\">clip</span><span class=\"p\">(</span><span class=\"n\">array_1</span><span class=\"p\">[</span><span class=\"n\">x</span><span class=\"p\">,</span> <span class=\"n\">y</span><span class=\"p\">],</span> <span class=\"mf\">2</span><span class=\"p\">,</span> <span class=\"mf\">10</span><span class=\"p\">)</span></pre>\n",
       "<pre class='cython code score-0 '>      __pyx_t_13 = __pyx_v_x;\n",
       "      __pyx_t_14 = __pyx_v_y;\n",
       "      __pyx_v_tmp = __pyx_fuse_0__pyx_f_46_cython_magic_749e2f06f11f9a32dbdfa8eae1a17ea3_clip((*((int *) ( /* dim=1 */ ((char *) (((int *) ( /* dim=0 */ (__pyx_v_array_1.data + __pyx_t_13 * __pyx_v_array_1.strides[0]) )) + __pyx_t_14)) ))), 2, 10);\n",
       "/* … */\n",
       "      __pyx_t_13 = __pyx_v_x;\n",
       "      __pyx_t_14 = __pyx_v_y;\n",
       "      __pyx_v_tmp = __pyx_fuse_1__pyx_f_46_cython_magic_749e2f06f11f9a32dbdfa8eae1a17ea3_clip((*((float *) ( /* dim=1 */ ((char *) (((float *) ( /* dim=0 */ (__pyx_v_array_1.data + __pyx_t_13 * __pyx_v_array_1.strides[0]) )) + __pyx_t_14)) ))), 2.0, 10.0);\n",
       "/* … */\n",
       "      __pyx_t_13 = __pyx_v_x;\n",
       "      __pyx_t_14 = __pyx_v_y;\n",
       "      __pyx_v_tmp = __pyx_fuse_2__pyx_f_46_cython_magic_749e2f06f11f9a32dbdfa8eae1a17ea3_clip((*((double *) ( /* dim=1 */ ((char *) (((double *) ( /* dim=0 */ (__pyx_v_array_1.data + __pyx_t_13 * __pyx_v_array_1.strides[0]) )) + __pyx_t_14)) ))), 2.0, 10.0);\n",
       "</pre><pre class=\"cython line score-0\" onclick=\"(function(s){s.display=s.display==='block'?'none':'block'})(this.nextElementSibling.style)\">+<span class=\"\">39</span>:             <span class=\"n\">tmp</span> <span class=\"o\">=</span> <span class=\"n\">tmp</span> <span class=\"o\">*</span> <span class=\"n\">a</span> <span class=\"o\">+</span> <span class=\"n\">array_2</span><span class=\"p\">[</span><span class=\"n\">x</span><span class=\"p\">,</span> <span class=\"n\">y</span><span class=\"p\">]</span> <span class=\"o\">*</span> <span class=\"n\">b</span></pre>\n",
       "<pre class='cython code score-0 '>      __pyx_t_15 = __pyx_v_x;\n",
       "      __pyx_t_16 = __pyx_v_y;\n",
       "      __pyx_v_tmp = ((__pyx_v_tmp * __pyx_v_a) + ((*((int *) ( /* dim=1 */ ((char *) (((int *) ( /* dim=0 */ (__pyx_v_array_2.data + __pyx_t_15 * __pyx_v_array_2.strides[0]) )) + __pyx_t_16)) ))) * __pyx_v_b));\n",
       "/* … */\n",
       "      __pyx_t_15 = __pyx_v_x;\n",
       "      __pyx_t_16 = __pyx_v_y;\n",
       "      __pyx_v_tmp = ((__pyx_v_tmp * __pyx_v_a) + ((*((float *) ( /* dim=1 */ ((char *) (((float *) ( /* dim=0 */ (__pyx_v_array_2.data + __pyx_t_15 * __pyx_v_array_2.strides[0]) )) + __pyx_t_16)) ))) * __pyx_v_b));\n",
       "/* … */\n",
       "      __pyx_t_15 = __pyx_v_x;\n",
       "      __pyx_t_16 = __pyx_v_y;\n",
       "      __pyx_v_tmp = ((__pyx_v_tmp * __pyx_v_a) + ((*((double *) ( /* dim=1 */ ((char *) (((double *) ( /* dim=0 */ (__pyx_v_array_2.data + __pyx_t_15 * __pyx_v_array_2.strides[0]) )) + __pyx_t_16)) ))) * __pyx_v_b));\n",
       "</pre><pre class=\"cython line score-0\" onclick=\"(function(s){s.display=s.display==='block'?'none':'block'})(this.nextElementSibling.style)\">+<span class=\"\">40</span>:             <span class=\"n\">result_view</span><span class=\"p\">[</span><span class=\"n\">x</span><span class=\"p\">,</span> <span class=\"n\">y</span><span class=\"p\">]</span> <span class=\"o\">=</span> <span class=\"n\">tmp</span> <span class=\"o\">+</span> <span class=\"n\">c</span></pre>\n",
       "<pre class='cython code score-0 '>      __pyx_t_17 = __pyx_v_x;\n",
       "      __pyx_t_18 = __pyx_v_y;\n",
       "      *((int *) ( /* dim=1 */ ((char *) (((int *) ( /* dim=0 */ (__pyx_v_result_view.data + __pyx_t_17 * __pyx_v_result_view.strides[0]) )) + __pyx_t_18)) )) = (__pyx_v_tmp + __pyx_v_c);\n",
       "    }\n",
       "  }\n",
       "/* … */\n",
       "      __pyx_t_17 = __pyx_v_x;\n",
       "      __pyx_t_18 = __pyx_v_y;\n",
       "      *((float *) ( /* dim=1 */ ((char *) (((float *) ( /* dim=0 */ (__pyx_v_result_view.data + __pyx_t_17 * __pyx_v_result_view.strides[0]) )) + __pyx_t_18)) )) = (__pyx_v_tmp + __pyx_v_c);\n",
       "    }\n",
       "  }\n",
       "/* … */\n",
       "      __pyx_t_17 = __pyx_v_x;\n",
       "      __pyx_t_18 = __pyx_v_y;\n",
       "      *((double *) ( /* dim=1 */ ((char *) (((double *) ( /* dim=0 */ (__pyx_v_result_view.data + __pyx_t_17 * __pyx_v_result_view.strides[0]) )) + __pyx_t_18)) )) = (__pyx_v_tmp + __pyx_v_c);\n",
       "    }\n",
       "  }\n",
       "</pre><pre class=\"cython line score-0\">&#xA0;<span class=\"\">41</span>: </pre>\n",
       "<pre class=\"cython line score-6\" onclick=\"(function(s){s.display=s.display==='block'?'none':'block'})(this.nextElementSibling.style)\">+<span class=\"\">42</span>:     <span class=\"k\">return</span> <span class=\"n\">result</span></pre>\n",
       "<pre class='cython code score-6 '>  <span class='pyx_macro_api'>__Pyx_XDECREF</span>(__pyx_r);\n",
       "  <span class='pyx_macro_api'>__Pyx_INCREF</span>(__pyx_v_result);\n",
       "  __pyx_r = __pyx_v_result;\n",
       "  goto __pyx_L0;\n",
       "/* … */\n",
       "  <span class='pyx_macro_api'>__Pyx_XDECREF</span>(__pyx_r);\n",
       "  <span class='pyx_macro_api'>__Pyx_INCREF</span>(__pyx_v_result);\n",
       "  __pyx_r = __pyx_v_result;\n",
       "  goto __pyx_L0;\n",
       "/* … */\n",
       "  <span class='pyx_macro_api'>__Pyx_XDECREF</span>(__pyx_r);\n",
       "  <span class='pyx_macro_api'>__Pyx_INCREF</span>(__pyx_v_result);\n",
       "  __pyx_r = __pyx_v_result;\n",
       "  goto __pyx_L0;\n",
       "</pre></div></body></html>"
      ],
      "text/plain": [
       "<IPython.core.display.HTML object>"
      ]
     },
     "execution_count": 6,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "%%cython -a\n",
    "\n",
    "import numpy as np\n",
    "cimport cython\n",
    "\n",
    "ctypedef fused scalar_t:\n",
    "    int\n",
    "    float\n",
    "    double\n",
    "\n",
    "cdef scalar_t clip(scalar_t a, scalar_t min_value, scalar_t max_value):\n",
    "    return min(max(a, min_value), max_value)\n",
    "\n",
    "@cython.boundscheck(False)\n",
    "@cython.wraparound(False)\n",
    "def compute(scalar_t[:, ::1] array_1, scalar_t[:, ::1] array_2, scalar_t a, scalar_t b, scalar_t c):\n",
    "     \n",
    "    x_max = array_1.shape[0]\n",
    "    y_max = array_1.shape[1]\n",
    "    \n",
    "    assert tuple(array_1.shape) == tuple(array_2.shape)\n",
    "    \n",
    "    if scalar_t is int:\n",
    "        dtype = np.intc\n",
    "    elif scalar_t is float:\n",
    "        dtype = np.float\n",
    "    elif scalar_t is double:\n",
    "        dtype = np.double\n",
    "        \n",
    "    result = np.zeros((x_max, y_max), dtype=dtype)\n",
    "    cdef scalar_t[:, ::1] result_view = result\n",
    "\n",
    "    cdef scalar_t tmp\n",
    "    cdef Py_ssize_t x, y\n",
    "\n",
    "    for x in range(x_max):\n",
    "        for y in range(y_max):\n",
    "\n",
    "            tmp = clip(array_1[x, y], 2, 10)\n",
    "            tmp = tmp * a + array_2[x, y] * b\n",
    "            result_view[x, y] = tmp + c\n",
    "\n",
    "    return result"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 7,
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "14.6 ms ± 1.15 ms per loop (mean ± std. dev. of 7 runs, 100 loops each)\n"
     ]
    }
   ],
   "source": [
    "%timeit compute(array_1, array_2, a, b, c)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 25,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/html": [
       "<!DOCTYPE html>\n",
       "<!-- Generated by Cython 0.29.14 -->\n",
       "<html>\n",
       "<head>\n",
       "    <meta http-equiv=\"Content-Type\" content=\"text/html; charset=utf-8\" />\n",
       "    <title>Cython: _cython_magic_94f57fbe7e3614554eedac9e3346e5ec.pyx</title>\n",
       "    <style type=\"text/css\">\n",
       "    \n",
       "body.cython { font-family: courier; font-size: 12; }\n",
       "\n",
       ".cython.tag  {  }\n",
       ".cython.line { margin: 0em }\n",
       ".cython.code { font-size: 9; color: #444444; display: none; margin: 0px 0px 0px 8px; border-left: 8px none; }\n",
       "\n",
       ".cython.line .run { background-color: #B0FFB0; }\n",
       ".cython.line .mis { background-color: #FFB0B0; }\n",
       ".cython.code.run  { border-left: 8px solid #B0FFB0; }\n",
       ".cython.code.mis  { border-left: 8px solid #FFB0B0; }\n",
       "\n",
       ".cython.code .py_c_api  { color: red; }\n",
       ".cython.code .py_macro_api  { color: #FF7000; }\n",
       ".cython.code .pyx_c_api  { color: #FF3000; }\n",
       ".cython.code .pyx_macro_api  { color: #FF7000; }\n",
       ".cython.code .refnanny  { color: #FFA000; }\n",
       ".cython.code .trace  { color: #FFA000; }\n",
       ".cython.code .error_goto  { color: #FFA000; }\n",
       "\n",
       ".cython.code .coerce  { color: #008000; border: 1px dotted #008000 }\n",
       ".cython.code .py_attr { color: #FF0000; font-weight: bold; }\n",
       ".cython.code .c_attr  { color: #0000FF; }\n",
       ".cython.code .py_call { color: #FF0000; font-weight: bold; }\n",
       ".cython.code .c_call  { color: #0000FF; }\n",
       "\n",
       ".cython.score-0 {background-color: #FFFFff;}\n",
       ".cython.score-1 {background-color: #FFFFe7;}\n",
       ".cython.score-2 {background-color: #FFFFd4;}\n",
       ".cython.score-3 {background-color: #FFFFc4;}\n",
       ".cython.score-4 {background-color: #FFFFb6;}\n",
       ".cython.score-5 {background-color: #FFFFaa;}\n",
       ".cython.score-6 {background-color: #FFFF9f;}\n",
       ".cython.score-7 {background-color: #FFFF96;}\n",
       ".cython.score-8 {background-color: #FFFF8d;}\n",
       ".cython.score-9 {background-color: #FFFF86;}\n",
       ".cython.score-10 {background-color: #FFFF7f;}\n",
       ".cython.score-11 {background-color: #FFFF79;}\n",
       ".cython.score-12 {background-color: #FFFF73;}\n",
       ".cython.score-13 {background-color: #FFFF6e;}\n",
       ".cython.score-14 {background-color: #FFFF6a;}\n",
       ".cython.score-15 {background-color: #FFFF66;}\n",
       ".cython.score-16 {background-color: #FFFF62;}\n",
       ".cython.score-17 {background-color: #FFFF5e;}\n",
       ".cython.score-18 {background-color: #FFFF5b;}\n",
       ".cython.score-19 {background-color: #FFFF57;}\n",
       ".cython.score-20 {background-color: #FFFF55;}\n",
       ".cython.score-21 {background-color: #FFFF52;}\n",
       ".cython.score-22 {background-color: #FFFF4f;}\n",
       ".cython.score-23 {background-color: #FFFF4d;}\n",
       ".cython.score-24 {background-color: #FFFF4b;}\n",
       ".cython.score-25 {background-color: #FFFF48;}\n",
       ".cython.score-26 {background-color: #FFFF46;}\n",
       ".cython.score-27 {background-color: #FFFF44;}\n",
       ".cython.score-28 {background-color: #FFFF43;}\n",
       ".cython.score-29 {background-color: #FFFF41;}\n",
       ".cython.score-30 {background-color: #FFFF3f;}\n",
       ".cython.score-31 {background-color: #FFFF3e;}\n",
       ".cython.score-32 {background-color: #FFFF3c;}\n",
       ".cython.score-33 {background-color: #FFFF3b;}\n",
       ".cython.score-34 {background-color: #FFFF39;}\n",
       ".cython.score-35 {background-color: #FFFF38;}\n",
       ".cython.score-36 {background-color: #FFFF37;}\n",
       ".cython.score-37 {background-color: #FFFF36;}\n",
       ".cython.score-38 {background-color: #FFFF35;}\n",
       ".cython.score-39 {background-color: #FFFF34;}\n",
       ".cython.score-40 {background-color: #FFFF33;}\n",
       ".cython.score-41 {background-color: #FFFF32;}\n",
       ".cython.score-42 {background-color: #FFFF31;}\n",
       ".cython.score-43 {background-color: #FFFF30;}\n",
       ".cython.score-44 {background-color: #FFFF2f;}\n",
       ".cython.score-45 {background-color: #FFFF2e;}\n",
       ".cython.score-46 {background-color: #FFFF2d;}\n",
       ".cython.score-47 {background-color: #FFFF2c;}\n",
       ".cython.score-48 {background-color: #FFFF2b;}\n",
       ".cython.score-49 {background-color: #FFFF2b;}\n",
       ".cython.score-50 {background-color: #FFFF2a;}\n",
       ".cython.score-51 {background-color: #FFFF29;}\n",
       ".cython.score-52 {background-color: #FFFF29;}\n",
       ".cython.score-53 {background-color: #FFFF28;}\n",
       ".cython.score-54 {background-color: #FFFF27;}\n",
       ".cython.score-55 {background-color: #FFFF27;}\n",
       ".cython.score-56 {background-color: #FFFF26;}\n",
       ".cython.score-57 {background-color: #FFFF26;}\n",
       ".cython.score-58 {background-color: #FFFF25;}\n",
       ".cython.score-59 {background-color: #FFFF24;}\n",
       ".cython.score-60 {background-color: #FFFF24;}\n",
       ".cython.score-61 {background-color: #FFFF23;}\n",
       ".cython.score-62 {background-color: #FFFF23;}\n",
       ".cython.score-63 {background-color: #FFFF22;}\n",
       ".cython.score-64 {background-color: #FFFF22;}\n",
       ".cython.score-65 {background-color: #FFFF22;}\n",
       ".cython.score-66 {background-color: #FFFF21;}\n",
       ".cython.score-67 {background-color: #FFFF21;}\n",
       ".cython.score-68 {background-color: #FFFF20;}\n",
       ".cython.score-69 {background-color: #FFFF20;}\n",
       ".cython.score-70 {background-color: #FFFF1f;}\n",
       ".cython.score-71 {background-color: #FFFF1f;}\n",
       ".cython.score-72 {background-color: #FFFF1f;}\n",
       ".cython.score-73 {background-color: #FFFF1e;}\n",
       ".cython.score-74 {background-color: #FFFF1e;}\n",
       ".cython.score-75 {background-color: #FFFF1e;}\n",
       ".cython.score-76 {background-color: #FFFF1d;}\n",
       ".cython.score-77 {background-color: #FFFF1d;}\n",
       ".cython.score-78 {background-color: #FFFF1c;}\n",
       ".cython.score-79 {background-color: #FFFF1c;}\n",
       ".cython.score-80 {background-color: #FFFF1c;}\n",
       ".cython.score-81 {background-color: #FFFF1c;}\n",
       ".cython.score-82 {background-color: #FFFF1b;}\n",
       ".cython.score-83 {background-color: #FFFF1b;}\n",
       ".cython.score-84 {background-color: #FFFF1b;}\n",
       ".cython.score-85 {background-color: #FFFF1a;}\n",
       ".cython.score-86 {background-color: #FFFF1a;}\n",
       ".cython.score-87 {background-color: #FFFF1a;}\n",
       ".cython.score-88 {background-color: #FFFF1a;}\n",
       ".cython.score-89 {background-color: #FFFF19;}\n",
       ".cython.score-90 {background-color: #FFFF19;}\n",
       ".cython.score-91 {background-color: #FFFF19;}\n",
       ".cython.score-92 {background-color: #FFFF19;}\n",
       ".cython.score-93 {background-color: #FFFF18;}\n",
       ".cython.score-94 {background-color: #FFFF18;}\n",
       ".cython.score-95 {background-color: #FFFF18;}\n",
       ".cython.score-96 {background-color: #FFFF18;}\n",
       ".cython.score-97 {background-color: #FFFF17;}\n",
       ".cython.score-98 {background-color: #FFFF17;}\n",
       ".cython.score-99 {background-color: #FFFF17;}\n",
       ".cython.score-100 {background-color: #FFFF17;}\n",
       ".cython.score-101 {background-color: #FFFF16;}\n",
       ".cython.score-102 {background-color: #FFFF16;}\n",
       ".cython.score-103 {background-color: #FFFF16;}\n",
       ".cython.score-104 {background-color: #FFFF16;}\n",
       ".cython.score-105 {background-color: #FFFF16;}\n",
       ".cython.score-106 {background-color: #FFFF15;}\n",
       ".cython.score-107 {background-color: #FFFF15;}\n",
       ".cython.score-108 {background-color: #FFFF15;}\n",
       ".cython.score-109 {background-color: #FFFF15;}\n",
       ".cython.score-110 {background-color: #FFFF15;}\n",
       ".cython.score-111 {background-color: #FFFF15;}\n",
       ".cython.score-112 {background-color: #FFFF14;}\n",
       ".cython.score-113 {background-color: #FFFF14;}\n",
       ".cython.score-114 {background-color: #FFFF14;}\n",
       ".cython.score-115 {background-color: #FFFF14;}\n",
       ".cython.score-116 {background-color: #FFFF14;}\n",
       ".cython.score-117 {background-color: #FFFF14;}\n",
       ".cython.score-118 {background-color: #FFFF13;}\n",
       ".cython.score-119 {background-color: #FFFF13;}\n",
       ".cython.score-120 {background-color: #FFFF13;}\n",
       ".cython.score-121 {background-color: #FFFF13;}\n",
       ".cython.score-122 {background-color: #FFFF13;}\n",
       ".cython.score-123 {background-color: #FFFF13;}\n",
       ".cython.score-124 {background-color: #FFFF13;}\n",
       ".cython.score-125 {background-color: #FFFF12;}\n",
       ".cython.score-126 {background-color: #FFFF12;}\n",
       ".cython.score-127 {background-color: #FFFF12;}\n",
       ".cython.score-128 {background-color: #FFFF12;}\n",
       ".cython.score-129 {background-color: #FFFF12;}\n",
       ".cython.score-130 {background-color: #FFFF12;}\n",
       ".cython.score-131 {background-color: #FFFF12;}\n",
       ".cython.score-132 {background-color: #FFFF11;}\n",
       ".cython.score-133 {background-color: #FFFF11;}\n",
       ".cython.score-134 {background-color: #FFFF11;}\n",
       ".cython.score-135 {background-color: #FFFF11;}\n",
       ".cython.score-136 {background-color: #FFFF11;}\n",
       ".cython.score-137 {background-color: #FFFF11;}\n",
       ".cython.score-138 {background-color: #FFFF11;}\n",
       ".cython.score-139 {background-color: #FFFF11;}\n",
       ".cython.score-140 {background-color: #FFFF11;}\n",
       ".cython.score-141 {background-color: #FFFF10;}\n",
       ".cython.score-142 {background-color: #FFFF10;}\n",
       ".cython.score-143 {background-color: #FFFF10;}\n",
       ".cython.score-144 {background-color: #FFFF10;}\n",
       ".cython.score-145 {background-color: #FFFF10;}\n",
       ".cython.score-146 {background-color: #FFFF10;}\n",
       ".cython.score-147 {background-color: #FFFF10;}\n",
       ".cython.score-148 {background-color: #FFFF10;}\n",
       ".cython.score-149 {background-color: #FFFF10;}\n",
       ".cython.score-150 {background-color: #FFFF0f;}\n",
       ".cython.score-151 {background-color: #FFFF0f;}\n",
       ".cython.score-152 {background-color: #FFFF0f;}\n",
       ".cython.score-153 {background-color: #FFFF0f;}\n",
       ".cython.score-154 {background-color: #FFFF0f;}\n",
       ".cython.score-155 {background-color: #FFFF0f;}\n",
       ".cython.score-156 {background-color: #FFFF0f;}\n",
       ".cython.score-157 {background-color: #FFFF0f;}\n",
       ".cython.score-158 {background-color: #FFFF0f;}\n",
       ".cython.score-159 {background-color: #FFFF0f;}\n",
       ".cython.score-160 {background-color: #FFFF0f;}\n",
       ".cython.score-161 {background-color: #FFFF0e;}\n",
       ".cython.score-162 {background-color: #FFFF0e;}\n",
       ".cython.score-163 {background-color: #FFFF0e;}\n",
       ".cython.score-164 {background-color: #FFFF0e;}\n",
       ".cython.score-165 {background-color: #FFFF0e;}\n",
       ".cython.score-166 {background-color: #FFFF0e;}\n",
       ".cython.score-167 {background-color: #FFFF0e;}\n",
       ".cython.score-168 {background-color: #FFFF0e;}\n",
       ".cython.score-169 {background-color: #FFFF0e;}\n",
       ".cython.score-170 {background-color: #FFFF0e;}\n",
       ".cython.score-171 {background-color: #FFFF0e;}\n",
       ".cython.score-172 {background-color: #FFFF0e;}\n",
       ".cython.score-173 {background-color: #FFFF0d;}\n",
       ".cython.score-174 {background-color: #FFFF0d;}\n",
       ".cython.score-175 {background-color: #FFFF0d;}\n",
       ".cython.score-176 {background-color: #FFFF0d;}\n",
       ".cython.score-177 {background-color: #FFFF0d;}\n",
       ".cython.score-178 {background-color: #FFFF0d;}\n",
       ".cython.score-179 {background-color: #FFFF0d;}\n",
       ".cython.score-180 {background-color: #FFFF0d;}\n",
       ".cython.score-181 {background-color: #FFFF0d;}\n",
       ".cython.score-182 {background-color: #FFFF0d;}\n",
       ".cython.score-183 {background-color: #FFFF0d;}\n",
       ".cython.score-184 {background-color: #FFFF0d;}\n",
       ".cython.score-185 {background-color: #FFFF0d;}\n",
       ".cython.score-186 {background-color: #FFFF0d;}\n",
       ".cython.score-187 {background-color: #FFFF0c;}\n",
       ".cython.score-188 {background-color: #FFFF0c;}\n",
       ".cython.score-189 {background-color: #FFFF0c;}\n",
       ".cython.score-190 {background-color: #FFFF0c;}\n",
       ".cython.score-191 {background-color: #FFFF0c;}\n",
       ".cython.score-192 {background-color: #FFFF0c;}\n",
       ".cython.score-193 {background-color: #FFFF0c;}\n",
       ".cython.score-194 {background-color: #FFFF0c;}\n",
       ".cython.score-195 {background-color: #FFFF0c;}\n",
       ".cython.score-196 {background-color: #FFFF0c;}\n",
       ".cython.score-197 {background-color: #FFFF0c;}\n",
       ".cython.score-198 {background-color: #FFFF0c;}\n",
       ".cython.score-199 {background-color: #FFFF0c;}\n",
       ".cython.score-200 {background-color: #FFFF0c;}\n",
       ".cython.score-201 {background-color: #FFFF0c;}\n",
       ".cython.score-202 {background-color: #FFFF0c;}\n",
       ".cython.score-203 {background-color: #FFFF0b;}\n",
       ".cython.score-204 {background-color: #FFFF0b;}\n",
       ".cython.score-205 {background-color: #FFFF0b;}\n",
       ".cython.score-206 {background-color: #FFFF0b;}\n",
       ".cython.score-207 {background-color: #FFFF0b;}\n",
       ".cython.score-208 {background-color: #FFFF0b;}\n",
       ".cython.score-209 {background-color: #FFFF0b;}\n",
       ".cython.score-210 {background-color: #FFFF0b;}\n",
       ".cython.score-211 {background-color: #FFFF0b;}\n",
       ".cython.score-212 {background-color: #FFFF0b;}\n",
       ".cython.score-213 {background-color: #FFFF0b;}\n",
       ".cython.score-214 {background-color: #FFFF0b;}\n",
       ".cython.score-215 {background-color: #FFFF0b;}\n",
       ".cython.score-216 {background-color: #FFFF0b;}\n",
       ".cython.score-217 {background-color: #FFFF0b;}\n",
       ".cython.score-218 {background-color: #FFFF0b;}\n",
       ".cython.score-219 {background-color: #FFFF0b;}\n",
       ".cython.score-220 {background-color: #FFFF0b;}\n",
       ".cython.score-221 {background-color: #FFFF0b;}\n",
       ".cython.score-222 {background-color: #FFFF0a;}\n",
       ".cython.score-223 {background-color: #FFFF0a;}\n",
       ".cython.score-224 {background-color: #FFFF0a;}\n",
       ".cython.score-225 {background-color: #FFFF0a;}\n",
       ".cython.score-226 {background-color: #FFFF0a;}\n",
       ".cython.score-227 {background-color: #FFFF0a;}\n",
       ".cython.score-228 {background-color: #FFFF0a;}\n",
       ".cython.score-229 {background-color: #FFFF0a;}\n",
       ".cython.score-230 {background-color: #FFFF0a;}\n",
       ".cython.score-231 {background-color: #FFFF0a;}\n",
       ".cython.score-232 {background-color: #FFFF0a;}\n",
       ".cython.score-233 {background-color: #FFFF0a;}\n",
       ".cython.score-234 {background-color: #FFFF0a;}\n",
       ".cython.score-235 {background-color: #FFFF0a;}\n",
       ".cython.score-236 {background-color: #FFFF0a;}\n",
       ".cython.score-237 {background-color: #FFFF0a;}\n",
       ".cython.score-238 {background-color: #FFFF0a;}\n",
       ".cython.score-239 {background-color: #FFFF0a;}\n",
       ".cython.score-240 {background-color: #FFFF0a;}\n",
       ".cython.score-241 {background-color: #FFFF0a;}\n",
       ".cython.score-242 {background-color: #FFFF0a;}\n",
       ".cython.score-243 {background-color: #FFFF0a;}\n",
       ".cython.score-244 {background-color: #FFFF0a;}\n",
       ".cython.score-245 {background-color: #FFFF0a;}\n",
       ".cython.score-246 {background-color: #FFFF09;}\n",
       ".cython.score-247 {background-color: #FFFF09;}\n",
       ".cython.score-248 {background-color: #FFFF09;}\n",
       ".cython.score-249 {background-color: #FFFF09;}\n",
       ".cython.score-250 {background-color: #FFFF09;}\n",
       ".cython.score-251 {background-color: #FFFF09;}\n",
       ".cython.score-252 {background-color: #FFFF09;}\n",
       ".cython.score-253 {background-color: #FFFF09;}\n",
       ".cython.score-254 {background-color: #FFFF09;}\n",
       ".cython .hll { background-color: #ffffcc }\n",
       ".cython  { background: #f8f8f8; }\n",
       ".cython .c { color: #408080; font-style: italic } /* Comment */\n",
       ".cython .err { border: 1px solid #FF0000 } /* Error */\n",
       ".cython .k { color: #008000; font-weight: bold } /* Keyword */\n",
       ".cython .o { color: #666666 } /* Operator */\n",
       ".cython .ch { color: #408080; font-style: italic } /* Comment.Hashbang */\n",
       ".cython .cm { color: #408080; font-style: italic } /* Comment.Multiline */\n",
       ".cython .cp { color: #BC7A00 } /* Comment.Preproc */\n",
       ".cython .cpf { color: #408080; font-style: italic } /* Comment.PreprocFile */\n",
       ".cython .c1 { color: #408080; font-style: italic } /* Comment.Single */\n",
       ".cython .cs { color: #408080; font-style: italic } /* Comment.Special */\n",
       ".cython .gd { color: #A00000 } /* Generic.Deleted */\n",
       ".cython .ge { font-style: italic } /* Generic.Emph */\n",
       ".cython .gr { color: #FF0000 } /* Generic.Error */\n",
       ".cython .gh { color: #000080; font-weight: bold } /* Generic.Heading */\n",
       ".cython .gi { color: #00A000 } /* Generic.Inserted */\n",
       ".cython .go { color: #888888 } /* Generic.Output */\n",
       ".cython .gp { color: #000080; font-weight: bold } /* Generic.Prompt */\n",
       ".cython .gs { font-weight: bold } /* Generic.Strong */\n",
       ".cython .gu { color: #800080; font-weight: bold } /* Generic.Subheading */\n",
       ".cython .gt { color: #0044DD } /* Generic.Traceback */\n",
       ".cython .kc { color: #008000; font-weight: bold } /* Keyword.Constant */\n",
       ".cython .kd { color: #008000; font-weight: bold } /* Keyword.Declaration */\n",
       ".cython .kn { color: #008000; font-weight: bold } /* Keyword.Namespace */\n",
       ".cython .kp { color: #008000 } /* Keyword.Pseudo */\n",
       ".cython .kr { color: #008000; font-weight: bold } /* Keyword.Reserved */\n",
       ".cython .kt { color: #B00040 } /* Keyword.Type */\n",
       ".cython .m { color: #666666 } /* Literal.Number */\n",
       ".cython .s { color: #BA2121 } /* Literal.String */\n",
       ".cython .na { color: #7D9029 } /* Name.Attribute */\n",
       ".cython .nb { color: #008000 } /* Name.Builtin */\n",
       ".cython .nc { color: #0000FF; font-weight: bold } /* Name.Class */\n",
       ".cython .no { color: #880000 } /* Name.Constant */\n",
       ".cython .nd { color: #AA22FF } /* Name.Decorator */\n",
       ".cython .ni { color: #999999; font-weight: bold } /* Name.Entity */\n",
       ".cython .ne { color: #D2413A; font-weight: bold } /* Name.Exception */\n",
       ".cython .nf { color: #0000FF } /* Name.Function */\n",
       ".cython .nl { color: #A0A000 } /* Name.Label */\n",
       ".cython .nn { color: #0000FF; font-weight: bold } /* Name.Namespace */\n",
       ".cython .nt { color: #008000; font-weight: bold } /* Name.Tag */\n",
       ".cython .nv { color: #19177C } /* Name.Variable */\n",
       ".cython .ow { color: #AA22FF; font-weight: bold } /* Operator.Word */\n",
       ".cython .w { color: #bbbbbb } /* Text.Whitespace */\n",
       ".cython .mb { color: #666666 } /* Literal.Number.Bin */\n",
       ".cython .mf { color: #666666 } /* Literal.Number.Float */\n",
       ".cython .mh { color: #666666 } /* Literal.Number.Hex */\n",
       ".cython .mi { color: #666666 } /* Literal.Number.Integer */\n",
       ".cython .mo { color: #666666 } /* Literal.Number.Oct */\n",
       ".cython .sa { color: #BA2121 } /* Literal.String.Affix */\n",
       ".cython .sb { color: #BA2121 } /* Literal.String.Backtick */\n",
       ".cython .sc { color: #BA2121 } /* Literal.String.Char */\n",
       ".cython .dl { color: #BA2121 } /* Literal.String.Delimiter */\n",
       ".cython .sd { color: #BA2121; font-style: italic } /* Literal.String.Doc */\n",
       ".cython .s2 { color: #BA2121 } /* Literal.String.Double */\n",
       ".cython .se { color: #BB6622; font-weight: bold } /* Literal.String.Escape */\n",
       ".cython .sh { color: #BA2121 } /* Literal.String.Heredoc */\n",
       ".cython .si { color: #BB6688; font-weight: bold } /* Literal.String.Interpol */\n",
       ".cython .sx { color: #008000 } /* Literal.String.Other */\n",
       ".cython .sr { color: #BB6688 } /* Literal.String.Regex */\n",
       ".cython .s1 { color: #BA2121 } /* Literal.String.Single */\n",
       ".cython .ss { color: #19177C } /* Literal.String.Symbol */\n",
       ".cython .bp { color: #008000 } /* Name.Builtin.Pseudo */\n",
       ".cython .fm { color: #0000FF } /* Name.Function.Magic */\n",
       ".cython .vc { color: #19177C } /* Name.Variable.Class */\n",
       ".cython .vg { color: #19177C } /* Name.Variable.Global */\n",
       ".cython .vi { color: #19177C } /* Name.Variable.Instance */\n",
       ".cython .vm { color: #19177C } /* Name.Variable.Magic */\n",
       ".cython .il { color: #666666 } /* Literal.Number.Integer.Long */\n",
       "    </style>\n",
       "</head>\n",
       "<body class=\"cython\">\n",
       "<p><span style=\"border-bottom: solid 1px grey;\">Generated by Cython 0.29.14</span></p>\n",
       "<p>\n",
       "    <span style=\"background-color: #FFFF00\">Yellow lines</span> hint at Python interaction.<br />\n",
       "    Click on a line that starts with a \"<code>+</code>\" to see the C code that Cython generated for it.\n",
       "</p>\n",
       "<div class=\"cython\"><pre class=\"cython line score-0\">&#xA0;<span class=\"\">01</span>: </pre>\n",
       "<pre class=\"cython line score-8\" onclick=\"(function(s){s.display=s.display==='block'?'none':'block'})(this.nextElementSibling.style)\">+<span class=\"\">02</span>: <span class=\"k\">cimport</span> <span class=\"nn\">numpy</span> <span class=\"k\">as</span> <span class=\"nn\">np</span></pre>\n",
       "<pre class='cython code score-8 '>  __pyx_t_3 = <span class='pyx_c_api'>__Pyx_PyDict_NewPresized</span>(0);<span class='error_goto'> if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2, __pyx_L1_error)</span>\n",
       "  <span class='refnanny'>__Pyx_GOTREF</span>(__pyx_t_3);\n",
       "  if (<span class='py_c_api'>PyDict_SetItem</span>(__pyx_d, __pyx_n_s_test, __pyx_t_3) &lt; 0) <span class='error_goto'>__PYX_ERR(0, 2, __pyx_L1_error)</span>\n",
       "  <span class='pyx_macro_api'>__Pyx_DECREF</span>(__pyx_t_3); __pyx_t_3 = 0;\n",
       "</pre><pre class=\"cython line score-8\" onclick=\"(function(s){s.display=s.display==='block'?'none':'block'})(this.nextElementSibling.style)\">+<span class=\"\">03</span>: <span class=\"k\">import</span> <span class=\"nn\">numpy</span> <span class=\"k\">as</span> <span class=\"nn\">np</span></pre>\n",
       "<pre class='cython code score-8 '>  __pyx_t_1 = <span class='pyx_c_api'>__Pyx_Import</span>(__pyx_n_s_numpy, 0, 0);<span class='error_goto'> if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3, __pyx_L1_error)</span>\n",
       "  <span class='refnanny'>__Pyx_GOTREF</span>(__pyx_t_1);\n",
       "  if (<span class='py_c_api'>PyDict_SetItem</span>(__pyx_d, __pyx_n_s_np, __pyx_t_1) &lt; 0) <span class='error_goto'>__PYX_ERR(0, 3, __pyx_L1_error)</span>\n",
       "  <span class='pyx_macro_api'>__Pyx_DECREF</span>(__pyx_t_1); __pyx_t_1 = 0;\n",
       "</pre><pre class=\"cython line score-0\">&#xA0;<span class=\"\">04</span>: <span class=\"k\">cimport</span> <span class=\"nn\">cython</span></pre>\n",
       "<pre class=\"cython line score-0\">&#xA0;<span class=\"\">05</span>: </pre>\n",
       "<pre class=\"cython line score-0\">&#xA0;<span class=\"\">06</span>: <span class=\"k\">ctypedef</span> <span class=\"k\">fused</span> <span class=\"n\">scalar_t</span><span class=\"p\">:</span></pre>\n",
       "<pre class=\"cython line score-0\">&#xA0;<span class=\"\">07</span>:     <span class=\"nb\">float</span></pre>\n",
       "<pre class=\"cython line score-0\">&#xA0;<span class=\"\">08</span>:     <span class=\"n\">double</span></pre>\n",
       "<pre class=\"cython line score-0\">&#xA0;<span class=\"\">09</span>: </pre>\n",
       "<pre class=\"cython line score-0\">&#xA0;<span class=\"\">10</span>: <span class=\"nd\">@cython</span><span class=\"o\">.</span><span class=\"n\">boundscheck</span><span class=\"p\">(</span><span class=\"bp\">False</span><span class=\"p\">)</span></pre>\n",
       "<pre class=\"cython line score-0\">&#xA0;<span class=\"\">11</span>: <span class=\"nd\">@cython</span><span class=\"o\">.</span><span class=\"n\">wraparound</span><span class=\"p\">(</span><span class=\"bp\">False</span><span class=\"p\">)</span></pre>\n",
       "<pre class=\"cython line score-0\">&#xA0;<span class=\"\">12</span>: <span class=\"nd\">@cython</span><span class=\"o\">.</span><span class=\"n\">cdivision</span><span class=\"p\">(</span><span class=\"bp\">True</span><span class=\"p\">)</span></pre>\n",
       "<pre class=\"cython line score-445\" onclick=\"(function(s){s.display=s.display==='block'?'none':'block'})(this.nextElementSibling.style)\">+<span class=\"\">13</span>: <span class=\"k\">def</span> <span class=\"nf\">nms_cpu</span><span class=\"p\">(</span><span class=\"n\">np</span><span class=\"o\">.</span><span class=\"n\">ndarray</span><span class=\"p\">[</span><span class=\"n\">scalar_t</span><span class=\"p\">,</span> <span class=\"n\">ndim</span><span class=\"o\">=</span><span class=\"mf\">2</span><span class=\"p\">]</span> <span class=\"n\">dets</span><span class=\"p\">,</span> <span class=\"n\">scalar_t</span> <span class=\"n\">thresh</span><span class=\"p\">):</span></pre>\n",
       "<pre class='cython code score-445 '>/* Python wrapper */\n",
       "static PyObject *__pyx_pw_46_cython_magic_94f57fbe7e3614554eedac9e3346e5ec_1nms_cpu(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/\n",
       "static PyMethodDef __pyx_mdef_46_cython_magic_94f57fbe7e3614554eedac9e3346e5ec_1nms_cpu = {\"nms_cpu\", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_46_cython_magic_94f57fbe7e3614554eedac9e3346e5ec_1nms_cpu, METH_VARARGS|METH_KEYWORDS, 0};\n",
       "static PyObject *__pyx_pw_46_cython_magic_94f57fbe7e3614554eedac9e3346e5ec_1nms_cpu(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {\n",
       "  PyObject *__pyx_v_signatures = 0;\n",
       "  PyObject *__pyx_v_args = 0;\n",
       "  PyObject *__pyx_v_kwargs = 0;\n",
       "  CYTHON_UNUSED PyObject *__pyx_v_defaults = 0;\n",
       "  PyObject *__pyx_r = 0;\n",
       "  <span class='refnanny'>__Pyx_RefNannyDeclarations</span>\n",
       "  <span class='refnanny'>__Pyx_RefNannySetupContext</span>(\"__pyx_fused_cpdef (wrapper)\", 0);\n",
       "  {\n",
       "    static PyObject **__pyx_pyargnames[] = {&amp;__pyx_n_s_signatures,&amp;__pyx_n_s_args,&amp;__pyx_n_s_kwargs,&amp;__pyx_n_s_defaults,0};\n",
       "    PyObject* values[4] = {0,0,0,0};\n",
       "    if (unlikely(__pyx_kwds)) {\n",
       "      Py_ssize_t kw_args;\n",
       "      const Py_ssize_t pos_args = <span class='py_macro_api'>PyTuple_GET_SIZE</span>(__pyx_args);\n",
       "      switch (pos_args) {\n",
       "        case  4: values[3] = <span class='py_macro_api'>PyTuple_GET_ITEM</span>(__pyx_args, 3);\n",
       "        CYTHON_FALLTHROUGH;\n",
       "        case  3: values[2] = <span class='py_macro_api'>PyTuple_GET_ITEM</span>(__pyx_args, 2);\n",
       "        CYTHON_FALLTHROUGH;\n",
       "        case  2: values[1] = <span class='py_macro_api'>PyTuple_GET_ITEM</span>(__pyx_args, 1);\n",
       "        CYTHON_FALLTHROUGH;\n",
       "        case  1: values[0] = <span class='py_macro_api'>PyTuple_GET_ITEM</span>(__pyx_args, 0);\n",
       "        CYTHON_FALLTHROUGH;\n",
       "        case  0: break;\n",
       "        default: goto __pyx_L5_argtuple_error;\n",
       "      }\n",
       "      kw_args = <span class='py_c_api'>PyDict_Size</span>(__pyx_kwds);\n",
       "      switch (pos_args) {\n",
       "        case  0:\n",
       "        if (likely((values[0] = <span class='pyx_c_api'>__Pyx_PyDict_GetItemStr</span>(__pyx_kwds, __pyx_n_s_signatures)) != 0)) kw_args--;\n",
       "        else goto __pyx_L5_argtuple_error;\n",
       "        CYTHON_FALLTHROUGH;\n",
       "        case  1:\n",
       "        if (likely((values[1] = <span class='pyx_c_api'>__Pyx_PyDict_GetItemStr</span>(__pyx_kwds, __pyx_n_s_args)) != 0)) kw_args--;\n",
       "        else {\n",
       "          <span class='pyx_c_api'>__Pyx_RaiseArgtupleInvalid</span>(\"__pyx_fused_cpdef\", 1, 4, 4, 1); <span class='error_goto'>__PYX_ERR(0, 13, __pyx_L3_error)</span>\n",
       "        }\n",
       "        CYTHON_FALLTHROUGH;\n",
       "        case  2:\n",
       "        if (likely((values[2] = <span class='pyx_c_api'>__Pyx_PyDict_GetItemStr</span>(__pyx_kwds, __pyx_n_s_kwargs)) != 0)) kw_args--;\n",
       "        else {\n",
       "          <span class='pyx_c_api'>__Pyx_RaiseArgtupleInvalid</span>(\"__pyx_fused_cpdef\", 1, 4, 4, 2); <span class='error_goto'>__PYX_ERR(0, 13, __pyx_L3_error)</span>\n",
       "        }\n",
       "        CYTHON_FALLTHROUGH;\n",
       "        case  3:\n",
       "        if (likely((values[3] = <span class='pyx_c_api'>__Pyx_PyDict_GetItemStr</span>(__pyx_kwds, __pyx_n_s_defaults)) != 0)) kw_args--;\n",
       "        else {\n",
       "          <span class='pyx_c_api'>__Pyx_RaiseArgtupleInvalid</span>(\"__pyx_fused_cpdef\", 1, 4, 4, 3); <span class='error_goto'>__PYX_ERR(0, 13, __pyx_L3_error)</span>\n",
       "        }\n",
       "      }\n",
       "      if (unlikely(kw_args &gt; 0)) {\n",
       "        if (unlikely(<span class='pyx_c_api'>__Pyx_ParseOptionalKeywords</span>(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, \"__pyx_fused_cpdef\") &lt; 0)) <span class='error_goto'>__PYX_ERR(0, 13, __pyx_L3_error)</span>\n",
       "      }\n",
       "    } else if (<span class='py_macro_api'>PyTuple_GET_SIZE</span>(__pyx_args) != 4) {\n",
       "      goto __pyx_L5_argtuple_error;\n",
       "    } else {\n",
       "      values[0] = <span class='py_macro_api'>PyTuple_GET_ITEM</span>(__pyx_args, 0);\n",
       "      values[1] = <span class='py_macro_api'>PyTuple_GET_ITEM</span>(__pyx_args, 1);\n",
       "      values[2] = <span class='py_macro_api'>PyTuple_GET_ITEM</span>(__pyx_args, 2);\n",
       "      values[3] = <span class='py_macro_api'>PyTuple_GET_ITEM</span>(__pyx_args, 3);\n",
       "    }\n",
       "    __pyx_v_signatures = values[0];\n",
       "    __pyx_v_args = values[1];\n",
       "    __pyx_v_kwargs = values[2];\n",
       "    __pyx_v_defaults = values[3];\n",
       "  }\n",
       "  goto __pyx_L4_argument_unpacking_done;\n",
       "  __pyx_L5_argtuple_error:;\n",
       "  <span class='pyx_c_api'>__Pyx_RaiseArgtupleInvalid</span>(\"__pyx_fused_cpdef\", 1, 4, 4, <span class='py_macro_api'>PyTuple_GET_SIZE</span>(__pyx_args)); <span class='error_goto'>__PYX_ERR(0, 13, __pyx_L3_error)</span>\n",
       "  __pyx_L3_error:;\n",
       "  <span class='pyx_c_api'>__Pyx_AddTraceback</span>(\"_cython_magic_94f57fbe7e3614554eedac9e3346e5ec.__pyx_fused_cpdef\", __pyx_clineno, __pyx_lineno, __pyx_filename);\n",
       "  <span class='refnanny'>__Pyx_RefNannyFinishContext</span>();\n",
       "  return NULL;\n",
       "  __pyx_L4_argument_unpacking_done:;\n",
       "  __pyx_r = __pyx_pf_46_cython_magic_94f57fbe7e3614554eedac9e3346e5ec_nms_cpu(__pyx_self, __pyx_v_signatures, __pyx_v_args, __pyx_v_kwargs, __pyx_v_defaults);\n",
       "\n",
       "  /* function exit code */\n",
       "  <span class='refnanny'>__Pyx_RefNannyFinishContext</span>();\n",
       "  return __pyx_r;\n",
       "}\n",
       "\n",
       "static PyObject *__pyx_pf_46_cython_magic_94f57fbe7e3614554eedac9e3346e5ec_nms_cpu(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_signatures, PyObject *__pyx_v_args, PyObject *__pyx_v_kwargs, CYTHON_UNUSED PyObject *__pyx_v_defaults) {\n",
       "  PyObject *__pyx_v_dest_sig = NULL;\n",
       "  Py_ssize_t __pyx_v_i;\n",
       "  PyTypeObject *__pyx_v_ndarray = 0;\n",
       "  __Pyx_memviewslice __pyx_v_memslice;\n",
       "  Py_ssize_t __pyx_v_itemsize;\n",
       "  CYTHON_UNUSED int __pyx_v_dtype_signed;\n",
       "  char __pyx_v_kind;\n",
       "  PyObject *__pyx_v_arg = NULL;\n",
       "  PyObject *__pyx_v_dtype = NULL;\n",
       "  PyObject *__pyx_v_arg_base = NULL;\n",
       "  PyObject *__pyx_v_candidates = NULL;\n",
       "  PyObject *__pyx_v_sig = NULL;\n",
       "  int __pyx_v_match_found;\n",
       "  PyObject *__pyx_v_src_sig = NULL;\n",
       "  PyObject *__pyx_v_dst_type = NULL;\n",
       "  PyObject *__pyx_r = NULL;\n",
       "  <span class='refnanny'>__Pyx_RefNannyDeclarations</span>\n",
       "  <span class='refnanny'>__Pyx_RefNannySetupContext</span>(\"nms_cpu\", 0);\n",
       "  <span class='pyx_macro_api'>__Pyx_INCREF</span>(__pyx_v_kwargs);\n",
       "  __pyx_t_1 = <span class='py_c_api'>PyList_New</span>(1);<span class='error_goto'> if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 13, __pyx_L1_error)</span>\n",
       "  <span class='refnanny'>__Pyx_GOTREF</span>(__pyx_t_1);\n",
       "  <span class='pyx_macro_api'>__Pyx_INCREF</span>(Py_None);\n",
       "  <span class='refnanny'>__Pyx_GIVEREF</span>(Py_None);\n",
       "  <span class='py_macro_api'>PyList_SET_ITEM</span>(__pyx_t_1, 0, Py_None);\n",
       "  __pyx_v_dest_sig = ((PyObject*)__pyx_t_1);\n",
       "  __pyx_t_1 = 0;\n",
       "  __pyx_t_3 = (__pyx_v_kwargs != Py_None);\n",
       "  __pyx_t_4 = (__pyx_t_3 != 0);\n",
       "  if (__pyx_t_4) {\n",
       "  } else {\n",
       "    __pyx_t_2 = __pyx_t_4;\n",
       "    goto __pyx_L4_bool_binop_done;\n",
       "  }\n",
       "  __pyx_t_4 = <span class='pyx_c_api'>__Pyx_PyObject_IsTrue</span>(__pyx_v_kwargs); if (unlikely(__pyx_t_4 &lt; 0)) <span class='error_goto'>__PYX_ERR(0, 13, __pyx_L1_error)</span>\n",
       "  __pyx_t_3 = ((!__pyx_t_4) != 0);\n",
       "  __pyx_t_2 = __pyx_t_3;\n",
       "  __pyx_L4_bool_binop_done:;\n",
       "  if (__pyx_t_2) {\n",
       "    <span class='pyx_macro_api'>__Pyx_INCREF</span>(Py_None);\n",
       "    <span class='pyx_macro_api'>__Pyx_DECREF_SET</span>(__pyx_v_kwargs, Py_None);\n",
       "  }\n",
       "  __pyx_t_1 = ((PyObject *)<span class='pyx_c_api'>__Pyx_ImportNumPyArrayTypeIfAvailable</span>());<span class='error_goto'> if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 13, __pyx_L1_error)</span>\n",
       "  <span class='refnanny'>__Pyx_GOTREF</span>(__pyx_t_1);\n",
       "  __pyx_v_ndarray = ((PyTypeObject*)__pyx_t_1);\n",
       "  __pyx_t_1 = 0;\n",
       "  __pyx_v_itemsize = -1L;\n",
       "  if (unlikely(__pyx_v_args == Py_None)) {\n",
       "    <span class='py_c_api'>PyErr_SetString</span>(PyExc_TypeError, \"object of type 'NoneType' has no len()\");\n",
       "    <span class='error_goto'>__PYX_ERR(0, 13, __pyx_L1_error)</span>\n",
       "  }\n",
       "  __pyx_t_5 = <span class='py_macro_api'>PyTuple_GET_SIZE</span>(((PyObject*)__pyx_v_args));<span class='error_goto'> if (unlikely(__pyx_t_5 == ((Py_ssize_t)-1))) __PYX_ERR(0, 13, __pyx_L1_error)</span>\n",
       "  __pyx_t_2 = ((0 &lt; __pyx_t_5) != 0);\n",
       "  if (__pyx_t_2) {\n",
       "    if (unlikely(__pyx_v_args == Py_None)) {\n",
       "      <span class='py_c_api'>PyErr_SetString</span>(PyExc_TypeError, \"'NoneType' object is not subscriptable\");\n",
       "      <span class='error_goto'>__PYX_ERR(0, 13, __pyx_L1_error)</span>\n",
       "    }\n",
       "    __pyx_t_1 = <span class='py_macro_api'>PyTuple_GET_ITEM</span>(((PyObject*)__pyx_v_args), 0);\n",
       "    <span class='pyx_macro_api'>__Pyx_INCREF</span>(__pyx_t_1);\n",
       "    __pyx_v_arg = __pyx_t_1;\n",
       "    __pyx_t_1 = 0;\n",
       "    goto __pyx_L6;\n",
       "  }\n",
       "  __pyx_t_3 = (__pyx_v_kwargs != Py_None);\n",
       "  __pyx_t_4 = (__pyx_t_3 != 0);\n",
       "  if (__pyx_t_4) {\n",
       "  } else {\n",
       "    __pyx_t_2 = __pyx_t_4;\n",
       "    goto __pyx_L7_bool_binop_done;\n",
       "  }\n",
       "  if (unlikely(__pyx_v_kwargs == Py_None)) {\n",
       "    <span class='py_c_api'>PyErr_SetString</span>(PyExc_TypeError, \"'NoneType' object is not iterable\");\n",
       "    <span class='error_goto'>__PYX_ERR(0, 13, __pyx_L1_error)</span>\n",
       "  }\n",
       "  __pyx_t_4 = (<span class='pyx_c_api'>__Pyx_PyDict_ContainsTF</span>(__pyx_n_s_dets, ((PyObject*)__pyx_v_kwargs), Py_EQ)); if (unlikely(__pyx_t_4 &lt; 0)) <span class='error_goto'>__PYX_ERR(0, 13, __pyx_L1_error)</span>\n",
       "  __pyx_t_3 = (__pyx_t_4 != 0);\n",
       "  __pyx_t_2 = __pyx_t_3;\n",
       "  __pyx_L7_bool_binop_done:;\n",
       "  if (__pyx_t_2) {\n",
       "    if (unlikely(__pyx_v_kwargs == Py_None)) {\n",
       "      <span class='py_c_api'>PyErr_SetString</span>(PyExc_TypeError, \"'NoneType' object is not subscriptable\");\n",
       "      <span class='error_goto'>__PYX_ERR(0, 13, __pyx_L1_error)</span>\n",
       "    }\n",
       "    __pyx_t_1 = <span class='pyx_c_api'>__Pyx_PyDict_GetItem</span>(((PyObject*)__pyx_v_kwargs), __pyx_n_s_dets);<span class='error_goto'> if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 13, __pyx_L1_error)</span>\n",
       "    <span class='refnanny'>__Pyx_GOTREF</span>(__pyx_t_1);\n",
       "    __pyx_v_arg = __pyx_t_1;\n",
       "    __pyx_t_1 = 0;\n",
       "    goto __pyx_L6;\n",
       "  }\n",
       "  /*else*/ {\n",
       "    if (unlikely(__pyx_v_args == Py_None)) {\n",
       "      <span class='py_c_api'>PyErr_SetString</span>(PyExc_TypeError, \"object of type 'NoneType' has no len()\");\n",
       "      <span class='error_goto'>__PYX_ERR(0, 13, __pyx_L1_error)</span>\n",
       "    }\n",
       "    __pyx_t_5 = <span class='py_macro_api'>PyTuple_GET_SIZE</span>(((PyObject*)__pyx_v_args));<span class='error_goto'> if (unlikely(__pyx_t_5 == ((Py_ssize_t)-1))) __PYX_ERR(0, 13, __pyx_L1_error)</span>\n",
       "    __pyx_t_1 = <span class='py_c_api'>PyInt_FromSsize_t</span>(__pyx_t_5);<span class='error_goto'> if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 13, __pyx_L1_error)</span>\n",
       "    <span class='refnanny'>__Pyx_GOTREF</span>(__pyx_t_1);\n",
       "    __pyx_t_6 = <span class='py_c_api'>PyTuple_New</span>(3);<span class='error_goto'> if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 13, __pyx_L1_error)</span>\n",
       "    <span class='refnanny'>__Pyx_GOTREF</span>(__pyx_t_6);\n",
       "    <span class='pyx_macro_api'>__Pyx_INCREF</span>(__pyx_int_2);\n",
       "    <span class='refnanny'>__Pyx_GIVEREF</span>(__pyx_int_2);\n",
       "    <span class='py_macro_api'>PyTuple_SET_ITEM</span>(__pyx_t_6, 0, __pyx_int_2);\n",
       "    <span class='pyx_macro_api'>__Pyx_INCREF</span>(__pyx_n_s_s);\n",
       "    <span class='refnanny'>__Pyx_GIVEREF</span>(__pyx_n_s_s);\n",
       "    <span class='py_macro_api'>PyTuple_SET_ITEM</span>(__pyx_t_6, 1, __pyx_n_s_s);\n",
       "    <span class='refnanny'>__Pyx_GIVEREF</span>(__pyx_t_1);\n",
       "    <span class='py_macro_api'>PyTuple_SET_ITEM</span>(__pyx_t_6, 2, __pyx_t_1);\n",
       "    __pyx_t_1 = 0;\n",
       "    __pyx_t_1 = <span class='pyx_c_api'>__Pyx_PyString_Format</span>(__pyx_kp_s_Expected_at_least_d_argument_s_g, __pyx_t_6);<span class='error_goto'> if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 13, __pyx_L1_error)</span>\n",
       "    <span class='refnanny'>__Pyx_GOTREF</span>(__pyx_t_1);\n",
       "    <span class='pyx_macro_api'>__Pyx_DECREF</span>(__pyx_t_6); __pyx_t_6 = 0;\n",
       "    __pyx_t_6 = <span class='pyx_c_api'>__Pyx_PyObject_CallOneArg</span>(__pyx_builtin_TypeError, __pyx_t_1);<span class='error_goto'> if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 13, __pyx_L1_error)</span>\n",
       "    <span class='refnanny'>__Pyx_GOTREF</span>(__pyx_t_6);\n",
       "    <span class='pyx_macro_api'>__Pyx_DECREF</span>(__pyx_t_1); __pyx_t_1 = 0;\n",
       "    <span class='pyx_c_api'>__Pyx_Raise</span>(__pyx_t_6, 0, 0, 0);\n",
       "    <span class='pyx_macro_api'>__Pyx_DECREF</span>(__pyx_t_6); __pyx_t_6 = 0;\n",
       "    <span class='error_goto'>__PYX_ERR(0, 13, __pyx_L1_error)</span>\n",
       "  }\n",
       "  __pyx_L6:;\n",
       "  while (1) {\n",
       "    __pyx_t_2 = (__pyx_v_ndarray != ((PyTypeObject*)Py_None));\n",
       "    __pyx_t_3 = (__pyx_t_2 != 0);\n",
       "    if (__pyx_t_3) {\n",
       "      __pyx_t_3 = <span class='pyx_c_api'>__Pyx_TypeCheck</span>(__pyx_v_arg, __pyx_v_ndarray); \n",
       "      __pyx_t_2 = (__pyx_t_3 != 0);\n",
       "      if (__pyx_t_2) {\n",
       "        __pyx_t_6 = <span class='pyx_c_api'>__Pyx_PyObject_GetAttrStr</span>(__pyx_v_arg, __pyx_n_s_dtype);<span class='error_goto'> if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 13, __pyx_L1_error)</span>\n",
       "        <span class='refnanny'>__Pyx_GOTREF</span>(__pyx_t_6);\n",
       "        __pyx_v_dtype = __pyx_t_6;\n",
       "        __pyx_t_6 = 0;\n",
       "        goto __pyx_L12;\n",
       "      }\n",
       "      __pyx_t_2 = __pyx_memoryview_check(__pyx_v_arg); \n",
       "      __pyx_t_3 = (__pyx_t_2 != 0);\n",
       "      if (__pyx_t_3) {\n",
       "        __pyx_t_6 = <span class='pyx_c_api'>__Pyx_PyObject_GetAttrStr</span>(__pyx_v_arg, __pyx_n_s_base);<span class='error_goto'> if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 13, __pyx_L1_error)</span>\n",
       "        <span class='refnanny'>__Pyx_GOTREF</span>(__pyx_t_6);\n",
       "        __pyx_v_arg_base = __pyx_t_6;\n",
       "        __pyx_t_6 = 0;\n",
       "        __pyx_t_3 = <span class='pyx_c_api'>__Pyx_TypeCheck</span>(__pyx_v_arg_base, __pyx_v_ndarray); \n",
       "        __pyx_t_2 = (__pyx_t_3 != 0);\n",
       "        if (__pyx_t_2) {\n",
       "          __pyx_t_6 = <span class='pyx_c_api'>__Pyx_PyObject_GetAttrStr</span>(__pyx_v_arg_base, __pyx_n_s_dtype);<span class='error_goto'> if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 13, __pyx_L1_error)</span>\n",
       "          <span class='refnanny'>__Pyx_GOTREF</span>(__pyx_t_6);\n",
       "          __pyx_v_dtype = __pyx_t_6;\n",
       "          __pyx_t_6 = 0;\n",
       "          goto __pyx_L13;\n",
       "        }\n",
       "        /*else*/ {\n",
       "          <span class='pyx_macro_api'>__Pyx_INCREF</span>(Py_None);\n",
       "          __pyx_v_dtype = Py_None;\n",
       "        }\n",
       "        __pyx_L13:;\n",
       "        goto __pyx_L12;\n",
       "      }\n",
       "      /*else*/ {\n",
       "        <span class='pyx_macro_api'>__Pyx_INCREF</span>(Py_None);\n",
       "        __pyx_v_dtype = Py_None;\n",
       "      }\n",
       "      __pyx_L12:;\n",
       "      __pyx_v_itemsize = -1L;\n",
       "      __pyx_t_2 = (__pyx_v_dtype != Py_None);\n",
       "      __pyx_t_3 = (__pyx_t_2 != 0);\n",
       "      if (__pyx_t_3) {\n",
       "        __pyx_t_6 = <span class='pyx_c_api'>__Pyx_PyObject_GetAttrStr</span>(__pyx_v_dtype, __pyx_n_s_itemsize);<span class='error_goto'> if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 13, __pyx_L1_error)</span>\n",
       "        <span class='refnanny'>__Pyx_GOTREF</span>(__pyx_t_6);\n",
       "        __pyx_t_5 = <span class='pyx_c_api'>__Pyx_PyIndex_AsSsize_t</span>(__pyx_t_6); if (unlikely((__pyx_t_5 == (Py_ssize_t)-1) &amp;&amp; <span class='py_c_api'>PyErr_Occurred</span>())) <span class='error_goto'>__PYX_ERR(0, 13, __pyx_L1_error)</span>\n",
       "        <span class='pyx_macro_api'>__Pyx_DECREF</span>(__pyx_t_6); __pyx_t_6 = 0;\n",
       "        __pyx_v_itemsize = __pyx_t_5;\n",
       "        __pyx_t_6 = <span class='pyx_c_api'>__Pyx_PyObject_GetAttrStr</span>(__pyx_v_dtype, __pyx_n_s_kind);<span class='error_goto'> if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 13, __pyx_L1_error)</span>\n",
       "        <span class='refnanny'>__Pyx_GOTREF</span>(__pyx_t_6);\n",
       "        __pyx_t_7 = <span class='pyx_c_api'>__Pyx_PyObject_Ord</span>(__pyx_t_6);<span class='error_goto'> if (unlikely(__pyx_t_7 == ((long)(long)(Py_UCS4)-1))) __PYX_ERR(0, 13, __pyx_L1_error)</span>\n",
       "        <span class='pyx_macro_api'>__Pyx_DECREF</span>(__pyx_t_6); __pyx_t_6 = 0;\n",
       "        __pyx_v_kind = __pyx_t_7;\n",
       "        __pyx_v_dtype_signed = (__pyx_v_kind == 'i');\n",
       "        switch (__pyx_v_kind) {\n",
       "          case 'i':\n",
       "          case 'u':\n",
       "          break;\n",
       "          case 'f':\n",
       "          __pyx_t_2 = (((sizeof(float)) == __pyx_v_itemsize) != 0);\n",
       "          if (__pyx_t_2) {\n",
       "          } else {\n",
       "            __pyx_t_3 = __pyx_t_2;\n",
       "            goto __pyx_L16_bool_binop_done;\n",
       "          }\n",
       "          __pyx_t_6 = <span class='pyx_c_api'>__Pyx_PyObject_GetAttrStr</span>(__pyx_v_arg, __pyx_n_s_ndim);<span class='error_goto'> if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 13, __pyx_L1_error)</span>\n",
       "          <span class='refnanny'>__Pyx_GOTREF</span>(__pyx_t_6);\n",
       "          __pyx_t_5 = <span class='pyx_c_api'>__Pyx_PyIndex_AsSsize_t</span>(__pyx_t_6); if (unlikely((__pyx_t_5 == (Py_ssize_t)-1) &amp;&amp; <span class='py_c_api'>PyErr_Occurred</span>())) <span class='error_goto'>__PYX_ERR(0, 13, __pyx_L1_error)</span>\n",
       "          <span class='pyx_macro_api'>__Pyx_DECREF</span>(__pyx_t_6); __pyx_t_6 = 0;\n",
       "          __pyx_t_2 = ((((Py_ssize_t)__pyx_t_5) == 2) != 0);\n",
       "          __pyx_t_3 = __pyx_t_2;\n",
       "          __pyx_L16_bool_binop_done:;\n",
       "          if (__pyx_t_3) {\n",
       "            if (unlikely(<span class='pyx_c_api'>__Pyx_SetItemInt</span>(__pyx_v_dest_sig, 0, __pyx_n_s_float, long, 1, __Pyx_PyInt_From_long, 1, 0, 0) &lt; 0)) <span class='error_goto'>__PYX_ERR(0, 13, __pyx_L1_error)</span>\n",
       "            goto __pyx_L10_break;\n",
       "          }\n",
       "          __pyx_t_2 = (((sizeof(double)) == __pyx_v_itemsize) != 0);\n",
       "          if (__pyx_t_2) {\n",
       "          } else {\n",
       "            __pyx_t_3 = __pyx_t_2;\n",
       "            goto __pyx_L19_bool_binop_done;\n",
       "          }\n",
       "          __pyx_t_6 = <span class='pyx_c_api'>__Pyx_PyObject_GetAttrStr</span>(__pyx_v_arg, __pyx_n_s_ndim);<span class='error_goto'> if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 13, __pyx_L1_error)</span>\n",
       "          <span class='refnanny'>__Pyx_GOTREF</span>(__pyx_t_6);\n",
       "          __pyx_t_5 = <span class='pyx_c_api'>__Pyx_PyIndex_AsSsize_t</span>(__pyx_t_6); if (unlikely((__pyx_t_5 == (Py_ssize_t)-1) &amp;&amp; <span class='py_c_api'>PyErr_Occurred</span>())) <span class='error_goto'>__PYX_ERR(0, 13, __pyx_L1_error)</span>\n",
       "          <span class='pyx_macro_api'>__Pyx_DECREF</span>(__pyx_t_6); __pyx_t_6 = 0;\n",
       "          __pyx_t_2 = ((((Py_ssize_t)__pyx_t_5) == 2) != 0);\n",
       "          __pyx_t_3 = __pyx_t_2;\n",
       "          __pyx_L19_bool_binop_done:;\n",
       "          if (__pyx_t_3) {\n",
       "            if (unlikely(<span class='pyx_c_api'>__Pyx_SetItemInt</span>(__pyx_v_dest_sig, 0, __pyx_n_s_double, long, 1, __Pyx_PyInt_From_long, 1, 0, 0) &lt; 0)) <span class='error_goto'>__PYX_ERR(0, 13, __pyx_L1_error)</span>\n",
       "            goto __pyx_L10_break;\n",
       "          }\n",
       "          break;\n",
       "          case 'c':\n",
       "          break;\n",
       "          case 'O':\n",
       "          break;\n",
       "          default: break;\n",
       "        }\n",
       "      }\n",
       "    }\n",
       "    __pyx_t_2 = ((__pyx_v_itemsize == -1L) != 0);\n",
       "    if (!__pyx_t_2) {\n",
       "    } else {\n",
       "      __pyx_t_3 = __pyx_t_2;\n",
       "      goto __pyx_L22_bool_binop_done;\n",
       "    }\n",
       "    __pyx_t_2 = ((__pyx_v_itemsize == (sizeof(float))) != 0);\n",
       "    __pyx_t_3 = __pyx_t_2;\n",
       "    __pyx_L22_bool_binop_done:;\n",
       "    if (__pyx_t_3) {\n",
       "      __pyx_t_8 = <span class='pyx_c_api'>__Pyx_PyObject_to_MemoryviewSlice_dsds_float</span>(__pyx_v_arg, 0); \n",
       "      __pyx_v_memslice = __pyx_t_8;\n",
       "      __pyx_t_3 = (__pyx_v_memslice.memview != 0);\n",
       "      if (__pyx_t_3) {\n",
       "        __PYX_XDEC_MEMVIEW((&amp;__pyx_v_memslice), 1); \n",
       "        if (unlikely(<span class='pyx_c_api'>__Pyx_SetItemInt</span>(__pyx_v_dest_sig, 0, __pyx_n_s_float, long, 1, __Pyx_PyInt_From_long, 1, 0, 0) &lt; 0)) <span class='error_goto'>__PYX_ERR(0, 13, __pyx_L1_error)</span>\n",
       "        goto __pyx_L10_break;\n",
       "      }\n",
       "      /*else*/ {\n",
       "        <span class='py_c_api'>PyErr_Clear</span>(); \n",
       "      }\n",
       "    }\n",
       "    __pyx_t_2 = ((__pyx_v_itemsize == -1L) != 0);\n",
       "    if (!__pyx_t_2) {\n",
       "    } else {\n",
       "      __pyx_t_3 = __pyx_t_2;\n",
       "      goto __pyx_L26_bool_binop_done;\n",
       "    }\n",
       "    __pyx_t_2 = ((__pyx_v_itemsize == (sizeof(double))) != 0);\n",
       "    __pyx_t_3 = __pyx_t_2;\n",
       "    __pyx_L26_bool_binop_done:;\n",
       "    if (__pyx_t_3) {\n",
       "      __pyx_t_8 = <span class='pyx_c_api'>__Pyx_PyObject_to_MemoryviewSlice_dsds_double</span>(__pyx_v_arg, 0); \n",
       "      __pyx_v_memslice = __pyx_t_8;\n",
       "      __pyx_t_3 = (__pyx_v_memslice.memview != 0);\n",
       "      if (__pyx_t_3) {\n",
       "        __PYX_XDEC_MEMVIEW((&amp;__pyx_v_memslice), 1); \n",
       "        if (unlikely(<span class='pyx_c_api'>__Pyx_SetItemInt</span>(__pyx_v_dest_sig, 0, __pyx_n_s_double, long, 1, __Pyx_PyInt_From_long, 1, 0, 0) &lt; 0)) <span class='error_goto'>__PYX_ERR(0, 13, __pyx_L1_error)</span>\n",
       "        goto __pyx_L10_break;\n",
       "      }\n",
       "      /*else*/ {\n",
       "        <span class='py_c_api'>PyErr_Clear</span>(); \n",
       "      }\n",
       "    }\n",
       "    if (unlikely(<span class='pyx_c_api'>__Pyx_SetItemInt</span>(__pyx_v_dest_sig, 0, Py_None, long, 1, __Pyx_PyInt_From_long, 1, 0, 0) &lt; 0)) <span class='error_goto'>__PYX_ERR(0, 13, __pyx_L1_error)</span>\n",
       "    goto __pyx_L10_break;\n",
       "  }\n",
       "  __pyx_L10_break:;\n",
       "  __pyx_t_6 = <span class='py_c_api'>PyList_New</span>(0);<span class='error_goto'> if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 13, __pyx_L1_error)</span>\n",
       "  <span class='refnanny'>__Pyx_GOTREF</span>(__pyx_t_6);\n",
       "  __pyx_v_candidates = ((PyObject*)__pyx_t_6);\n",
       "  __pyx_t_6 = 0;\n",
       "  __pyx_t_5 = 0;\n",
       "  if (unlikely(__pyx_v_signatures == Py_None)) {\n",
       "    <span class='py_c_api'>PyErr_SetString</span>(PyExc_TypeError, \"'NoneType' object is not iterable\");\n",
       "    <span class='error_goto'>__PYX_ERR(0, 13, __pyx_L1_error)</span>\n",
       "  }\n",
       "  __pyx_t_1 = __Pyx_dict_iterator(((PyObject*)__pyx_v_signatures), 1, ((PyObject *)NULL), (&amp;__pyx_t_9), (&amp;__pyx_t_10));<span class='error_goto'> if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 13, __pyx_L1_error)</span>\n",
       "  <span class='refnanny'>__Pyx_GOTREF</span>(__pyx_t_1);\n",
       "  <span class='pyx_macro_api'>__Pyx_XDECREF</span>(__pyx_t_6);\n",
       "  __pyx_t_6 = __pyx_t_1;\n",
       "  __pyx_t_1 = 0;\n",
       "  while (1) {\n",
       "    __pyx_t_11 = __Pyx_dict_iter_next(__pyx_t_6, __pyx_t_9, &amp;__pyx_t_5, &amp;__pyx_t_1, NULL, NULL, __pyx_t_10);\n",
       "    if (unlikely(__pyx_t_11 == 0)) break;\n",
       "    if (unlikely(__pyx_t_11 == -1)) <span class='error_goto'>__PYX_ERR(0, 13, __pyx_L1_error)</span>\n",
       "    <span class='refnanny'>__Pyx_GOTREF</span>(__pyx_t_1);\n",
       "    <span class='pyx_macro_api'>__Pyx_XDECREF_SET</span>(__pyx_v_sig, __pyx_t_1);\n",
       "    __pyx_t_1 = 0;\n",
       "    __pyx_v_match_found = 0;\n",
       "    __pyx_t_13 = <span class='pyx_c_api'>__Pyx_PyObject_GetAttrStr</span>(__pyx_v_sig, __pyx_n_s_strip);<span class='error_goto'> if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 13, __pyx_L1_error)</span>\n",
       "    <span class='refnanny'>__Pyx_GOTREF</span>(__pyx_t_13);\n",
       "    __pyx_t_14 = NULL;\n",
       "    if (CYTHON_UNPACK_METHODS &amp;&amp; likely(<span class='py_c_api'>PyMethod_Check</span>(__pyx_t_13))) {\n",
       "      __pyx_t_14 = <span class='py_macro_api'>PyMethod_GET_SELF</span>(__pyx_t_13);\n",
       "      if (likely(__pyx_t_14)) {\n",
       "        PyObject* function = <span class='py_macro_api'>PyMethod_GET_FUNCTION</span>(__pyx_t_13);\n",
       "        <span class='pyx_macro_api'>__Pyx_INCREF</span>(__pyx_t_14);\n",
       "        <span class='pyx_macro_api'>__Pyx_INCREF</span>(function);\n",
       "        <span class='pyx_macro_api'>__Pyx_DECREF_SET</span>(__pyx_t_13, function);\n",
       "      }\n",
       "    }\n",
       "    __pyx_t_12 = (__pyx_t_14) ? __Pyx_PyObject_Call2Args(__pyx_t_13, __pyx_t_14, __pyx_kp_s_) : <span class='pyx_c_api'>__Pyx_PyObject_CallOneArg</span>(__pyx_t_13, __pyx_kp_s_);\n",
       "    <span class='pyx_macro_api'>__Pyx_XDECREF</span>(__pyx_t_14); __pyx_t_14 = 0;\n",
       "    if (unlikely(!__pyx_t_12)) <span class='error_goto'>__PYX_ERR(0, 13, __pyx_L1_error)</span>\n",
       "    <span class='refnanny'>__Pyx_GOTREF</span>(__pyx_t_12);\n",
       "    <span class='pyx_macro_api'>__Pyx_DECREF</span>(__pyx_t_13); __pyx_t_13 = 0;\n",
       "    __pyx_t_13 = <span class='pyx_c_api'>__Pyx_PyObject_GetAttrStr</span>(__pyx_t_12, __pyx_n_s_split);<span class='error_goto'> if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 13, __pyx_L1_error)</span>\n",
       "    <span class='refnanny'>__Pyx_GOTREF</span>(__pyx_t_13);\n",
       "    <span class='pyx_macro_api'>__Pyx_DECREF</span>(__pyx_t_12); __pyx_t_12 = 0;\n",
       "    __pyx_t_12 = NULL;\n",
       "    if (CYTHON_UNPACK_METHODS &amp;&amp; likely(<span class='py_c_api'>PyMethod_Check</span>(__pyx_t_13))) {\n",
       "      __pyx_t_12 = <span class='py_macro_api'>PyMethod_GET_SELF</span>(__pyx_t_13);\n",
       "      if (likely(__pyx_t_12)) {\n",
       "        PyObject* function = <span class='py_macro_api'>PyMethod_GET_FUNCTION</span>(__pyx_t_13);\n",
       "        <span class='pyx_macro_api'>__Pyx_INCREF</span>(__pyx_t_12);\n",
       "        <span class='pyx_macro_api'>__Pyx_INCREF</span>(function);\n",
       "        <span class='pyx_macro_api'>__Pyx_DECREF_SET</span>(__pyx_t_13, function);\n",
       "      }\n",
       "    }\n",
       "    __pyx_t_1 = (__pyx_t_12) ? __Pyx_PyObject_Call2Args(__pyx_t_13, __pyx_t_12, __pyx_kp_s__2) : <span class='pyx_c_api'>__Pyx_PyObject_CallOneArg</span>(__pyx_t_13, __pyx_kp_s__2);\n",
       "    <span class='pyx_macro_api'>__Pyx_XDECREF</span>(__pyx_t_12); __pyx_t_12 = 0;\n",
       "    if (unlikely(!__pyx_t_1)) <span class='error_goto'>__PYX_ERR(0, 13, __pyx_L1_error)</span>\n",
       "    <span class='refnanny'>__Pyx_GOTREF</span>(__pyx_t_1);\n",
       "    <span class='pyx_macro_api'>__Pyx_DECREF</span>(__pyx_t_13); __pyx_t_13 = 0;\n",
       "    <span class='pyx_macro_api'>__Pyx_XDECREF_SET</span>(__pyx_v_src_sig, __pyx_t_1);\n",
       "    __pyx_t_1 = 0;\n",
       "    __pyx_t_15 = <span class='py_macro_api'>PyList_GET_SIZE</span>(__pyx_v_dest_sig);<span class='error_goto'> if (unlikely(__pyx_t_15 == ((Py_ssize_t)-1))) __PYX_ERR(0, 13, __pyx_L1_error)</span>\n",
       "    __pyx_t_16 = __pyx_t_15;\n",
       "    for (__pyx_t_17 = 0; __pyx_t_17 &lt; __pyx_t_16; __pyx_t_17+=1) {\n",
       "      __pyx_v_i = __pyx_t_17;\n",
       "      __pyx_t_1 = <span class='py_macro_api'>PyList_GET_ITEM</span>(__pyx_v_dest_sig, __pyx_v_i);\n",
       "      <span class='pyx_macro_api'>__Pyx_INCREF</span>(__pyx_t_1);\n",
       "      <span class='pyx_macro_api'>__Pyx_XDECREF_SET</span>(__pyx_v_dst_type, __pyx_t_1);\n",
       "      __pyx_t_1 = 0;\n",
       "      __pyx_t_3 = (__pyx_v_dst_type != Py_None);\n",
       "      __pyx_t_2 = (__pyx_t_3 != 0);\n",
       "      if (__pyx_t_2) {\n",
       "        __pyx_t_1 = <span class='pyx_c_api'>__Pyx_GetItemInt</span>(__pyx_v_src_sig, __pyx_v_i, Py_ssize_t, 1, PyInt_FromSsize_t, 0, 0, 0);<span class='error_goto'> if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 13, __pyx_L1_error)</span>\n",
       "        <span class='refnanny'>__Pyx_GOTREF</span>(__pyx_t_1);\n",
       "        __pyx_t_13 = <span class='py_c_api'>PyObject_RichCompare</span>(__pyx_t_1, __pyx_v_dst_type, Py_EQ); <span class='refnanny'>__Pyx_XGOTREF</span>(__pyx_t_13);<span class='error_goto'> if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 13, __pyx_L1_error)</span>\n",
       "        <span class='pyx_macro_api'>__Pyx_DECREF</span>(__pyx_t_1); __pyx_t_1 = 0;\n",
       "        __pyx_t_2 = <span class='pyx_c_api'>__Pyx_PyObject_IsTrue</span>(__pyx_t_13); if (unlikely(__pyx_t_2 &lt; 0)) <span class='error_goto'>__PYX_ERR(0, 13, __pyx_L1_error)</span>\n",
       "        <span class='pyx_macro_api'>__Pyx_DECREF</span>(__pyx_t_13); __pyx_t_13 = 0;\n",
       "        if (__pyx_t_2) {\n",
       "          __pyx_v_match_found = 1;\n",
       "          goto __pyx_L34;\n",
       "        }\n",
       "        /*else*/ {\n",
       "          __pyx_v_match_found = 0;\n",
       "          goto __pyx_L32_break;\n",
       "        }\n",
       "        __pyx_L34:;\n",
       "      }\n",
       "    }\n",
       "    __pyx_L32_break:;\n",
       "    __pyx_t_2 = (__pyx_v_match_found != 0);\n",
       "    if (__pyx_t_2) {\n",
       "      __pyx_t_18 = <span class='pyx_c_api'>__Pyx_PyList_Append</span>(__pyx_v_candidates, __pyx_v_sig);<span class='error_goto'> if (unlikely(__pyx_t_18 == ((int)-1))) __PYX_ERR(0, 13, __pyx_L1_error)</span>\n",
       "    }\n",
       "  }\n",
       "  <span class='pyx_macro_api'>__Pyx_DECREF</span>(__pyx_t_6); __pyx_t_6 = 0;\n",
       "  __pyx_t_2 = (<span class='py_macro_api'>PyList_GET_SIZE</span>(__pyx_v_candidates) != 0);\n",
       "  __pyx_t_3 = ((!__pyx_t_2) != 0);\n",
       "  if (__pyx_t_3) {\n",
       "    __pyx_t_6 = <span class='pyx_c_api'>__Pyx_PyObject_Call</span>(__pyx_builtin_TypeError, __pyx_tuple__3, NULL);<span class='error_goto'> if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 13, __pyx_L1_error)</span>\n",
       "    <span class='refnanny'>__Pyx_GOTREF</span>(__pyx_t_6);\n",
       "    <span class='pyx_c_api'>__Pyx_Raise</span>(__pyx_t_6, 0, 0, 0);\n",
       "    <span class='pyx_macro_api'>__Pyx_DECREF</span>(__pyx_t_6); __pyx_t_6 = 0;\n",
       "    <span class='error_goto'>__PYX_ERR(0, 13, __pyx_L1_error)</span>\n",
       "  }\n",
       "  __pyx_t_9 = <span class='py_macro_api'>PyList_GET_SIZE</span>(__pyx_v_candidates);<span class='error_goto'> if (unlikely(__pyx_t_9 == ((Py_ssize_t)-1))) __PYX_ERR(0, 13, __pyx_L1_error)</span>\n",
       "  __pyx_t_3 = ((__pyx_t_9 &gt; 1) != 0);\n",
       "  if (__pyx_t_3) {\n",
       "/* … */\n",
       "  __pyx_tuple__3 = <span class='py_c_api'>PyTuple_Pack</span>(1, __pyx_kp_s_No_matching_signature_found);<span class='error_goto'> if (unlikely(!__pyx_tuple__3)) __PYX_ERR(0, 13, __pyx_L1_error)</span>\n",
       "  <span class='refnanny'>__Pyx_GOTREF</span>(__pyx_tuple__3);\n",
       "  <span class='refnanny'>__Pyx_GIVEREF</span>(__pyx_tuple__3);\n",
       "    __pyx_t_6 = <span class='pyx_c_api'>__Pyx_PyObject_Call</span>(__pyx_builtin_TypeError, __pyx_tuple__4, NULL);<span class='error_goto'> if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 13, __pyx_L1_error)</span>\n",
       "    <span class='refnanny'>__Pyx_GOTREF</span>(__pyx_t_6);\n",
       "    <span class='pyx_c_api'>__Pyx_Raise</span>(__pyx_t_6, 0, 0, 0);\n",
       "    <span class='pyx_macro_api'>__Pyx_DECREF</span>(__pyx_t_6); __pyx_t_6 = 0;\n",
       "    <span class='error_goto'>__PYX_ERR(0, 13, __pyx_L1_error)</span>\n",
       "  }\n",
       "  /*else*/ {\n",
       "    <span class='pyx_macro_api'>__Pyx_XDECREF</span>(__pyx_r);\n",
       "    if (unlikely(__pyx_v_signatures == Py_None)) {\n",
       "      <span class='py_c_api'>PyErr_SetString</span>(PyExc_TypeError, \"'NoneType' object is not subscriptable\");\n",
       "      <span class='error_goto'>__PYX_ERR(0, 13, __pyx_L1_error)</span>\n",
       "    }\n",
       "    __pyx_t_6 = <span class='pyx_c_api'>__Pyx_PyDict_GetItem</span>(((PyObject*)__pyx_v_signatures), <span class='py_macro_api'>PyList_GET_ITEM</span>(__pyx_v_candidates, 0));<span class='error_goto'> if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 13, __pyx_L1_error)</span>\n",
       "    <span class='refnanny'>__Pyx_GOTREF</span>(__pyx_t_6);\n",
       "    __pyx_r = __pyx_t_6;\n",
       "    __pyx_t_6 = 0;\n",
       "    goto __pyx_L0;\n",
       "  }\n",
       "\n",
       "  /* function exit code */\n",
       "  __pyx_L1_error:;\n",
       "  <span class='pyx_macro_api'>__Pyx_XDECREF</span>(__pyx_t_1);\n",
       "  <span class='pyx_macro_api'>__Pyx_XDECREF</span>(__pyx_t_6);\n",
       "  <span class='pyx_macro_api'>__Pyx_XDECREF</span>(__pyx_t_12);\n",
       "  <span class='pyx_macro_api'>__Pyx_XDECREF</span>(__pyx_t_13);\n",
       "  <span class='pyx_macro_api'>__Pyx_XDECREF</span>(__pyx_t_14);\n",
       "  <span class='pyx_c_api'>__Pyx_AddTraceback</span>(\"_cython_magic_94f57fbe7e3614554eedac9e3346e5ec.__pyx_fused_cpdef\", __pyx_clineno, __pyx_lineno, __pyx_filename);\n",
       "  __pyx_r = NULL;\n",
       "  __pyx_L0:;\n",
       "  <span class='pyx_macro_api'>__Pyx_XDECREF</span>(__pyx_v_dest_sig);\n",
       "  <span class='pyx_macro_api'>__Pyx_XDECREF</span>(__pyx_v_ndarray);\n",
       "  <span class='pyx_macro_api'>__Pyx_XDECREF</span>(__pyx_v_arg);\n",
       "  <span class='pyx_macro_api'>__Pyx_XDECREF</span>(__pyx_v_dtype);\n",
       "  <span class='pyx_macro_api'>__Pyx_XDECREF</span>(__pyx_v_arg_base);\n",
       "  <span class='pyx_macro_api'>__Pyx_XDECREF</span>(__pyx_v_candidates);\n",
       "  <span class='pyx_macro_api'>__Pyx_XDECREF</span>(__pyx_v_sig);\n",
       "  <span class='pyx_macro_api'>__Pyx_XDECREF</span>(__pyx_v_src_sig);\n",
       "  <span class='pyx_macro_api'>__Pyx_XDECREF</span>(__pyx_v_dst_type);\n",
       "  <span class='pyx_macro_api'>__Pyx_XDECREF</span>(__pyx_v_kwargs);\n",
       "  <span class='refnanny'>__Pyx_XGIVEREF</span>(__pyx_r);\n",
       "  <span class='refnanny'>__Pyx_RefNannyFinishContext</span>();\n",
       "  return __pyx_r;\n",
       "}\n",
       "\n",
       "/* Python wrapper */\n",
       "static PyObject *__pyx_fuse_0__pyx_pw_46_cython_magic_94f57fbe7e3614554eedac9e3346e5ec_3nms_cpu(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/\n",
       "static PyMethodDef __pyx_fuse_0__pyx_mdef_46_cython_magic_94f57fbe7e3614554eedac9e3346e5ec_3nms_cpu = {\"__pyx_fuse_0nms_cpu\", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_fuse_0__pyx_pw_46_cython_magic_94f57fbe7e3614554eedac9e3346e5ec_3nms_cpu, METH_VARARGS|METH_KEYWORDS, 0};\n",
       "static PyObject *__pyx_fuse_0__pyx_pw_46_cython_magic_94f57fbe7e3614554eedac9e3346e5ec_3nms_cpu(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {\n",
       "  PyArrayObject *__pyx_v_dets = 0;\n",
       "  float __pyx_v_thresh;\n",
       "  PyObject *__pyx_r = 0;\n",
       "  <span class='refnanny'>__Pyx_RefNannyDeclarations</span>\n",
       "  <span class='refnanny'>__Pyx_RefNannySetupContext</span>(\"nms_cpu (wrapper)\", 0);\n",
       "  {\n",
       "    static PyObject **__pyx_pyargnames[] = {&amp;__pyx_n_s_dets,&amp;__pyx_n_s_thresh,0};\n",
       "    PyObject* values[2] = {0,0};\n",
       "    if (unlikely(__pyx_kwds)) {\n",
       "      Py_ssize_t kw_args;\n",
       "      const Py_ssize_t pos_args = <span class='py_macro_api'>PyTuple_GET_SIZE</span>(__pyx_args);\n",
       "      switch (pos_args) {\n",
       "        case  2: values[1] = <span class='py_macro_api'>PyTuple_GET_ITEM</span>(__pyx_args, 1);\n",
       "        CYTHON_FALLTHROUGH;\n",
       "        case  1: values[0] = <span class='py_macro_api'>PyTuple_GET_ITEM</span>(__pyx_args, 0);\n",
       "        CYTHON_FALLTHROUGH;\n",
       "        case  0: break;\n",
       "        default: goto __pyx_L5_argtuple_error;\n",
       "      }\n",
       "      kw_args = <span class='py_c_api'>PyDict_Size</span>(__pyx_kwds);\n",
       "      switch (pos_args) {\n",
       "        case  0:\n",
       "        if (likely((values[0] = <span class='pyx_c_api'>__Pyx_PyDict_GetItemStr</span>(__pyx_kwds, __pyx_n_s_dets)) != 0)) kw_args--;\n",
       "        else goto __pyx_L5_argtuple_error;\n",
       "        CYTHON_FALLTHROUGH;\n",
       "        case  1:\n",
       "        if (likely((values[1] = <span class='pyx_c_api'>__Pyx_PyDict_GetItemStr</span>(__pyx_kwds, __pyx_n_s_thresh)) != 0)) kw_args--;\n",
       "        else {\n",
       "          <span class='pyx_c_api'>__Pyx_RaiseArgtupleInvalid</span>(\"nms_cpu\", 1, 2, 2, 1); <span class='error_goto'>__PYX_ERR(0, 13, __pyx_L3_error)</span>\n",
       "        }\n",
       "      }\n",
       "      if (unlikely(kw_args &gt; 0)) {\n",
       "        if (unlikely(<span class='pyx_c_api'>__Pyx_ParseOptionalKeywords</span>(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, \"nms_cpu\") &lt; 0)) <span class='error_goto'>__PYX_ERR(0, 13, __pyx_L3_error)</span>\n",
       "      }\n",
       "    } else if (<span class='py_macro_api'>PyTuple_GET_SIZE</span>(__pyx_args) != 2) {\n",
       "      goto __pyx_L5_argtuple_error;\n",
       "    } else {\n",
       "      values[0] = <span class='py_macro_api'>PyTuple_GET_ITEM</span>(__pyx_args, 0);\n",
       "      values[1] = <span class='py_macro_api'>PyTuple_GET_ITEM</span>(__pyx_args, 1);\n",
       "    }\n",
       "    __pyx_v_dets = ((PyArrayObject *)values[0]);\n",
       "    __pyx_v_thresh = __pyx_<span class='py_c_api'>PyFloat_AsFloat</span>(values[1]); if (unlikely((__pyx_v_thresh == (float)-1) &amp;&amp; <span class='py_c_api'>PyErr_Occurred</span>())) <span class='error_goto'>__PYX_ERR(0, 13, __pyx_L3_error)</span>\n",
       "  }\n",
       "  goto __pyx_L4_argument_unpacking_done;\n",
       "  __pyx_L5_argtuple_error:;\n",
       "  <span class='pyx_c_api'>__Pyx_RaiseArgtupleInvalid</span>(\"nms_cpu\", 1, 2, 2, <span class='py_macro_api'>PyTuple_GET_SIZE</span>(__pyx_args)); <span class='error_goto'>__PYX_ERR(0, 13, __pyx_L3_error)</span>\n",
       "  __pyx_L3_error:;\n",
       "  <span class='pyx_c_api'>__Pyx_AddTraceback</span>(\"_cython_magic_94f57fbe7e3614554eedac9e3346e5ec.nms_cpu\", __pyx_clineno, __pyx_lineno, __pyx_filename);\n",
       "  <span class='refnanny'>__Pyx_RefNannyFinishContext</span>();\n",
       "  return NULL;\n",
       "  __pyx_L4_argument_unpacking_done:;\n",
       "  if (unlikely(!<span class='pyx_c_api'>__Pyx_ArgTypeTest</span>(((PyObject *)__pyx_v_dets), __pyx_ptype_5numpy_ndarray, 1, \"dets\", 0))) <span class='error_goto'>__PYX_ERR(0, 13, __pyx_L1_error)</span>\n",
       "  __pyx_r = __pyx_pf_46_cython_magic_94f57fbe7e3614554eedac9e3346e5ec_2nms_cpu(__pyx_self, __pyx_v_dets, __pyx_v_thresh);\n",
       "\n",
       "  /* function exit code */\n",
       "  goto __pyx_L0;\n",
       "  __pyx_L1_error:;\n",
       "  __pyx_r = NULL;\n",
       "  __pyx_L0:;\n",
       "  <span class='refnanny'>__Pyx_RefNannyFinishContext</span>();\n",
       "  return __pyx_r;\n",
       "}\n",
       "\n",
       "static PyObject *__pyx_pf_46_cython_magic_94f57fbe7e3614554eedac9e3346e5ec_2nms_cpu(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_dets, float __pyx_v_thresh) {\n",
       "  PyObject *__pyx_v_scores = NULL;\n",
       "  PyObject *__pyx_v_x1 = NULL;\n",
       "  PyObject *__pyx_v_y1 = NULL;\n",
       "  PyObject *__pyx_v_x2 = NULL;\n",
       "  PyObject *__pyx_v_y2 = NULL;\n",
       "  PyObject *__pyx_v_areas = NULL;\n",
       "  __Pyx_memviewslice __pyx_v_areas_view = { 0, 0, { 0 }, { 0 }, { 0 } };\n",
       "  PyObject *__pyx_v_order = NULL;\n",
       "  __Pyx_memviewslice __pyx_v_order_view = { 0, 0, { 0 }, { 0 }, { 0 } };\n",
       "  npy_intp __pyx_v_ndets;\n",
       "  PyObject *__pyx_v_suppressed = NULL;\n",
       "  __Pyx_memviewslice __pyx_v_suppressed_view = { 0, 0, { 0 }, { 0 }, { 0 } };\n",
       "  float __pyx_v_ix1;\n",
       "  float __pyx_v_iy1;\n",
       "  float __pyx_v_ix2;\n",
       "  float __pyx_v_iy2;\n",
       "  float __pyx_v_iarea;\n",
       "  float __pyx_v_xx1;\n",
       "  float __pyx_v_yy1;\n",
       "  float __pyx_v_xx2;\n",
       "  float __pyx_v_yy2;\n",
       "  float __pyx_v_w;\n",
       "  float __pyx_v_h;\n",
       "  float __pyx_v_inter;\n",
       "  float __pyx_v_ovr;\n",
       "  Py_ssize_t __pyx_v__i;\n",
       "  Py_ssize_t __pyx_v__j;\n",
       "  Py_ssize_t __pyx_v_i;\n",
       "  Py_ssize_t __pyx_v_j;\n",
       "  __Pyx_memviewslice __pyx_v_x1_view = { 0, 0, { 0 }, { 0 }, { 0 } };\n",
       "  __Pyx_memviewslice __pyx_v_y1_view = { 0, 0, { 0 }, { 0 }, { 0 } };\n",
       "  __Pyx_memviewslice __pyx_v_x2_view = { 0, 0, { 0 }, { 0 }, { 0 } };\n",
       "  __Pyx_memviewslice __pyx_v_y2_view = { 0, 0, { 0 }, { 0 }, { 0 } };\n",
       "  __Pyx_LocalBuf_ND __pyx_pybuffernd_dets;\n",
       "  __Pyx_Buffer __pyx_pybuffer_dets;\n",
       "  PyObject *__pyx_r = NULL;\n",
       "  <span class='refnanny'>__Pyx_RefNannyDeclarations</span>\n",
       "  <span class='refnanny'>__Pyx_RefNannySetupContext</span>(\"__pyx_fuse_0nms_cpu\", 0);\n",
       "  __pyx_pybuffer_dets.pybuffer.buf = NULL;\n",
       "  __pyx_pybuffer_dets.refcount = 0;\n",
       "  __pyx_pybuffernd_dets.data = NULL;\n",
       "  __pyx_pybuffernd_dets.rcbuffer = &amp;__pyx_pybuffer_dets;\n",
       "  {\n",
       "    __Pyx_BufFmt_StackElem __pyx_stack[1];\n",
       "    if (unlikely(<span class='pyx_c_api'>__Pyx_GetBufferAndValidate</span>(&amp;__pyx_pybuffernd_dets.rcbuffer-&gt;pybuffer, (PyObject*)__pyx_v_dets, &amp;__Pyx_TypeInfo_float, PyBUF_FORMAT| PyBUF_STRIDES, 2, 0, __pyx_stack) == -1)) <span class='error_goto'>__PYX_ERR(0, 13, __pyx_L1_error)</span>\n",
       "  }\n",
       "  __pyx_pybuffernd_dets.diminfo[0].strides = __pyx_pybuffernd_dets.rcbuffer-&gt;pybuffer.strides[0]; __pyx_pybuffernd_dets.diminfo[0].shape = __pyx_pybuffernd_dets.rcbuffer-&gt;pybuffer.shape[0]; __pyx_pybuffernd_dets.diminfo[1].strides = __pyx_pybuffernd_dets.rcbuffer-&gt;pybuffer.strides[1]; __pyx_pybuffernd_dets.diminfo[1].shape = __pyx_pybuffernd_dets.rcbuffer-&gt;pybuffer.shape[1];\n",
       "  __pyx_tuple__4 = <span class='py_c_api'>PyTuple_Pack</span>(1, __pyx_kp_s_Function_call_with_ambiguous_arg);<span class='error_goto'> if (unlikely(!__pyx_tuple__4)) __PYX_ERR(0, 13, __pyx_L1_error)</span>\n",
       "  <span class='refnanny'>__Pyx_GOTREF</span>(__pyx_tuple__4);\n",
       "  <span class='refnanny'>__Pyx_GIVEREF</span>(__pyx_tuple__4);\n",
       "/* … */\n",
       "  /* function exit code */\n",
       "  __pyx_L1_error:;\n",
       "  <span class='pyx_macro_api'>__Pyx_XDECREF</span>(__pyx_t_2);\n",
       "  <span class='pyx_macro_api'>__Pyx_XDECREF</span>(__pyx_t_3);\n",
       "  <span class='pyx_macro_api'>__Pyx_XDECREF</span>(__pyx_t_4);\n",
       "  __PYX_XDEC_MEMVIEW(&amp;__pyx_t_5, 1);\n",
       "  __PYX_XDEC_MEMVIEW(&amp;__pyx_t_6, 1);\n",
       "  <span class='pyx_macro_api'>__Pyx_XDECREF</span>(__pyx_t_7);\n",
       "  <span class='pyx_macro_api'>__Pyx_XDECREF</span>(__pyx_t_8);\n",
       "  __PYX_XDEC_MEMVIEW(&amp;__pyx_t_9, 1);\n",
       "  __PYX_XDEC_MEMVIEW(&amp;__pyx_t_10, 1);\n",
       "  { PyObject *__pyx_type, *__pyx_value, *__pyx_tb;\n",
       "    __Pyx_PyThreadState_declare\n",
       "    __Pyx_PyThreadState_assign\n",
       "    <span class='pyx_c_api'>__Pyx_ErrFetch</span>(&amp;__pyx_type, &amp;__pyx_value, &amp;__pyx_tb);\n",
       "    <span class='pyx_c_api'>__Pyx_SafeReleaseBuffer</span>(&amp;__pyx_pybuffernd_dets.rcbuffer-&gt;pybuffer);\n",
       "  <span class='pyx_c_api'>__Pyx_ErrRestore</span>(__pyx_type, __pyx_value, __pyx_tb);}\n",
       "  <span class='pyx_c_api'>__Pyx_AddTraceback</span>(\"_cython_magic_94f57fbe7e3614554eedac9e3346e5ec.nms_cpu\", __pyx_clineno, __pyx_lineno, __pyx_filename);\n",
       "  __pyx_r = NULL;\n",
       "  goto __pyx_L2;\n",
       "  __pyx_L0:;\n",
       "  <span class='pyx_c_api'>__Pyx_SafeReleaseBuffer</span>(&amp;__pyx_pybuffernd_dets.rcbuffer-&gt;pybuffer);\n",
       "  __pyx_L2:;\n",
       "  <span class='pyx_macro_api'>__Pyx_XDECREF</span>(__pyx_v_scores);\n",
       "  <span class='pyx_macro_api'>__Pyx_XDECREF</span>(__pyx_v_x1);\n",
       "  <span class='pyx_macro_api'>__Pyx_XDECREF</span>(__pyx_v_y1);\n",
       "  <span class='pyx_macro_api'>__Pyx_XDECREF</span>(__pyx_v_x2);\n",
       "  <span class='pyx_macro_api'>__Pyx_XDECREF</span>(__pyx_v_y2);\n",
       "  <span class='pyx_macro_api'>__Pyx_XDECREF</span>(__pyx_v_areas);\n",
       "  __PYX_XDEC_MEMVIEW(&amp;__pyx_v_areas_view, 1);\n",
       "  <span class='pyx_macro_api'>__Pyx_XDECREF</span>(__pyx_v_order);\n",
       "  __PYX_XDEC_MEMVIEW(&amp;__pyx_v_order_view, 1);\n",
       "  <span class='pyx_macro_api'>__Pyx_XDECREF</span>(__pyx_v_suppressed);\n",
       "  __PYX_XDEC_MEMVIEW(&amp;__pyx_v_suppressed_view, 1);\n",
       "  __PYX_XDEC_MEMVIEW(&amp;__pyx_v_x1_view, 1);\n",
       "  __PYX_XDEC_MEMVIEW(&amp;__pyx_v_y1_view, 1);\n",
       "  __PYX_XDEC_MEMVIEW(&amp;__pyx_v_x2_view, 1);\n",
       "  __PYX_XDEC_MEMVIEW(&amp;__pyx_v_y2_view, 1);\n",
       "  <span class='refnanny'>__Pyx_XGIVEREF</span>(__pyx_r);\n",
       "  <span class='refnanny'>__Pyx_RefNannyFinishContext</span>();\n",
       "  return __pyx_r;\n",
       "}\n",
       "\n",
       "/* Python wrapper */\n",
       "static PyObject *__pyx_fuse_1__pyx_pw_46_cython_magic_94f57fbe7e3614554eedac9e3346e5ec_5nms_cpu(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/\n",
       "static PyMethodDef __pyx_fuse_1__pyx_mdef_46_cython_magic_94f57fbe7e3614554eedac9e3346e5ec_5nms_cpu = {\"__pyx_fuse_1nms_cpu\", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_fuse_1__pyx_pw_46_cython_magic_94f57fbe7e3614554eedac9e3346e5ec_5nms_cpu, METH_VARARGS|METH_KEYWORDS, 0};\n",
       "static PyObject *__pyx_fuse_1__pyx_pw_46_cython_magic_94f57fbe7e3614554eedac9e3346e5ec_5nms_cpu(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {\n",
       "  PyArrayObject *__pyx_v_dets = 0;\n",
       "  double __pyx_v_thresh;\n",
       "  PyObject *__pyx_r = 0;\n",
       "  <span class='refnanny'>__Pyx_RefNannyDeclarations</span>\n",
       "  <span class='refnanny'>__Pyx_RefNannySetupContext</span>(\"nms_cpu (wrapper)\", 0);\n",
       "  {\n",
       "    static PyObject **__pyx_pyargnames[] = {&amp;__pyx_n_s_dets,&amp;__pyx_n_s_thresh,0};\n",
       "    PyObject* values[2] = {0,0};\n",
       "    if (unlikely(__pyx_kwds)) {\n",
       "      Py_ssize_t kw_args;\n",
       "      const Py_ssize_t pos_args = <span class='py_macro_api'>PyTuple_GET_SIZE</span>(__pyx_args);\n",
       "      switch (pos_args) {\n",
       "        case  2: values[1] = <span class='py_macro_api'>PyTuple_GET_ITEM</span>(__pyx_args, 1);\n",
       "        CYTHON_FALLTHROUGH;\n",
       "        case  1: values[0] = <span class='py_macro_api'>PyTuple_GET_ITEM</span>(__pyx_args, 0);\n",
       "        CYTHON_FALLTHROUGH;\n",
       "        case  0: break;\n",
       "        default: goto __pyx_L5_argtuple_error;\n",
       "      }\n",
       "      kw_args = <span class='py_c_api'>PyDict_Size</span>(__pyx_kwds);\n",
       "      switch (pos_args) {\n",
       "        case  0:\n",
       "        if (likely((values[0] = <span class='pyx_c_api'>__Pyx_PyDict_GetItemStr</span>(__pyx_kwds, __pyx_n_s_dets)) != 0)) kw_args--;\n",
       "        else goto __pyx_L5_argtuple_error;\n",
       "        CYTHON_FALLTHROUGH;\n",
       "        case  1:\n",
       "        if (likely((values[1] = <span class='pyx_c_api'>__Pyx_PyDict_GetItemStr</span>(__pyx_kwds, __pyx_n_s_thresh)) != 0)) kw_args--;\n",
       "        else {\n",
       "          <span class='pyx_c_api'>__Pyx_RaiseArgtupleInvalid</span>(\"nms_cpu\", 1, 2, 2, 1); <span class='error_goto'>__PYX_ERR(0, 13, __pyx_L3_error)</span>\n",
       "        }\n",
       "      }\n",
       "      if (unlikely(kw_args &gt; 0)) {\n",
       "        if (unlikely(<span class='pyx_c_api'>__Pyx_ParseOptionalKeywords</span>(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, \"nms_cpu\") &lt; 0)) <span class='error_goto'>__PYX_ERR(0, 13, __pyx_L3_error)</span>\n",
       "      }\n",
       "    } else if (<span class='py_macro_api'>PyTuple_GET_SIZE</span>(__pyx_args) != 2) {\n",
       "      goto __pyx_L5_argtuple_error;\n",
       "    } else {\n",
       "      values[0] = <span class='py_macro_api'>PyTuple_GET_ITEM</span>(__pyx_args, 0);\n",
       "      values[1] = <span class='py_macro_api'>PyTuple_GET_ITEM</span>(__pyx_args, 1);\n",
       "    }\n",
       "    __pyx_v_dets = ((PyArrayObject *)values[0]);\n",
       "    __pyx_v_thresh = __pyx_<span class='py_c_api'>PyFloat_AsDouble</span>(values[1]); if (unlikely((__pyx_v_thresh == (double)-1) &amp;&amp; <span class='py_c_api'>PyErr_Occurred</span>())) <span class='error_goto'>__PYX_ERR(0, 13, __pyx_L3_error)</span>\n",
       "  }\n",
       "  goto __pyx_L4_argument_unpacking_done;\n",
       "  __pyx_L5_argtuple_error:;\n",
       "  <span class='pyx_c_api'>__Pyx_RaiseArgtupleInvalid</span>(\"nms_cpu\", 1, 2, 2, <span class='py_macro_api'>PyTuple_GET_SIZE</span>(__pyx_args)); <span class='error_goto'>__PYX_ERR(0, 13, __pyx_L3_error)</span>\n",
       "  __pyx_L3_error:;\n",
       "  <span class='pyx_c_api'>__Pyx_AddTraceback</span>(\"_cython_magic_94f57fbe7e3614554eedac9e3346e5ec.nms_cpu\", __pyx_clineno, __pyx_lineno, __pyx_filename);\n",
       "  <span class='refnanny'>__Pyx_RefNannyFinishContext</span>();\n",
       "  return NULL;\n",
       "  __pyx_L4_argument_unpacking_done:;\n",
       "  if (unlikely(!<span class='pyx_c_api'>__Pyx_ArgTypeTest</span>(((PyObject *)__pyx_v_dets), __pyx_ptype_5numpy_ndarray, 1, \"dets\", 0))) <span class='error_goto'>__PYX_ERR(0, 13, __pyx_L1_error)</span>\n",
       "  __pyx_r = __pyx_pf_46_cython_magic_94f57fbe7e3614554eedac9e3346e5ec_4nms_cpu(__pyx_self, __pyx_v_dets, __pyx_v_thresh);\n",
       "\n",
       "  /* function exit code */\n",
       "  goto __pyx_L0;\n",
       "  __pyx_L1_error:;\n",
       "  __pyx_r = NULL;\n",
       "  __pyx_L0:;\n",
       "  <span class='refnanny'>__Pyx_RefNannyFinishContext</span>();\n",
       "  return __pyx_r;\n",
       "}\n",
       "\n",
       "static PyObject *__pyx_pf_46_cython_magic_94f57fbe7e3614554eedac9e3346e5ec_4nms_cpu(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_dets, double __pyx_v_thresh) {\n",
       "  PyObject *__pyx_v_scores = NULL;\n",
       "  PyObject *__pyx_v_x1 = NULL;\n",
       "  PyObject *__pyx_v_y1 = NULL;\n",
       "  PyObject *__pyx_v_x2 = NULL;\n",
       "  PyObject *__pyx_v_y2 = NULL;\n",
       "  PyObject *__pyx_v_areas = NULL;\n",
       "  __Pyx_memviewslice __pyx_v_areas_view = { 0, 0, { 0 }, { 0 }, { 0 } };\n",
       "  PyObject *__pyx_v_order = NULL;\n",
       "  __Pyx_memviewslice __pyx_v_order_view = { 0, 0, { 0 }, { 0 }, { 0 } };\n",
       "  npy_intp __pyx_v_ndets;\n",
       "  PyObject *__pyx_v_suppressed = NULL;\n",
       "  __Pyx_memviewslice __pyx_v_suppressed_view = { 0, 0, { 0 }, { 0 }, { 0 } };\n",
       "  double __pyx_v_ix1;\n",
       "  double __pyx_v_iy1;\n",
       "  double __pyx_v_ix2;\n",
       "  double __pyx_v_iy2;\n",
       "  double __pyx_v_iarea;\n",
       "  double __pyx_v_xx1;\n",
       "  double __pyx_v_yy1;\n",
       "  double __pyx_v_xx2;\n",
       "  double __pyx_v_yy2;\n",
       "  double __pyx_v_w;\n",
       "  double __pyx_v_h;\n",
       "  double __pyx_v_inter;\n",
       "  double __pyx_v_ovr;\n",
       "  Py_ssize_t __pyx_v__i;\n",
       "  Py_ssize_t __pyx_v__j;\n",
       "  Py_ssize_t __pyx_v_i;\n",
       "  Py_ssize_t __pyx_v_j;\n",
       "  __Pyx_memviewslice __pyx_v_x1_view = { 0, 0, { 0 }, { 0 }, { 0 } };\n",
       "  __Pyx_memviewslice __pyx_v_y1_view = { 0, 0, { 0 }, { 0 }, { 0 } };\n",
       "  __Pyx_memviewslice __pyx_v_x2_view = { 0, 0, { 0 }, { 0 }, { 0 } };\n",
       "  __Pyx_memviewslice __pyx_v_y2_view = { 0, 0, { 0 }, { 0 }, { 0 } };\n",
       "  __Pyx_LocalBuf_ND __pyx_pybuffernd_dets;\n",
       "  __Pyx_Buffer __pyx_pybuffer_dets;\n",
       "  PyObject *__pyx_r = NULL;\n",
       "  <span class='refnanny'>__Pyx_RefNannyDeclarations</span>\n",
       "  <span class='refnanny'>__Pyx_RefNannySetupContext</span>(\"__pyx_fuse_1nms_cpu\", 0);\n",
       "  __pyx_pybuffer_dets.pybuffer.buf = NULL;\n",
       "  __pyx_pybuffer_dets.refcount = 0;\n",
       "  __pyx_pybuffernd_dets.data = NULL;\n",
       "  __pyx_pybuffernd_dets.rcbuffer = &amp;__pyx_pybuffer_dets;\n",
       "  {\n",
       "    __Pyx_BufFmt_StackElem __pyx_stack[1];\n",
       "    if (unlikely(<span class='pyx_c_api'>__Pyx_GetBufferAndValidate</span>(&amp;__pyx_pybuffernd_dets.rcbuffer-&gt;pybuffer, (PyObject*)__pyx_v_dets, &amp;__Pyx_TypeInfo_double, PyBUF_FORMAT| PyBUF_STRIDES, 2, 0, __pyx_stack) == -1)) <span class='error_goto'>__PYX_ERR(0, 13, __pyx_L1_error)</span>\n",
       "  }\n",
       "  __pyx_pybuffernd_dets.diminfo[0].strides = __pyx_pybuffernd_dets.rcbuffer-&gt;pybuffer.strides[0]; __pyx_pybuffernd_dets.diminfo[0].shape = __pyx_pybuffernd_dets.rcbuffer-&gt;pybuffer.shape[0]; __pyx_pybuffernd_dets.diminfo[1].strides = __pyx_pybuffernd_dets.rcbuffer-&gt;pybuffer.strides[1]; __pyx_pybuffernd_dets.diminfo[1].shape = __pyx_pybuffernd_dets.rcbuffer-&gt;pybuffer.shape[1];\n",
       "/* … */\n",
       "  /* function exit code */\n",
       "  __pyx_L1_error:;\n",
       "  <span class='pyx_macro_api'>__Pyx_XDECREF</span>(__pyx_t_2);\n",
       "  <span class='pyx_macro_api'>__Pyx_XDECREF</span>(__pyx_t_3);\n",
       "  <span class='pyx_macro_api'>__Pyx_XDECREF</span>(__pyx_t_4);\n",
       "  __PYX_XDEC_MEMVIEW(&amp;__pyx_t_5, 1);\n",
       "  __PYX_XDEC_MEMVIEW(&amp;__pyx_t_6, 1);\n",
       "  <span class='pyx_macro_api'>__Pyx_XDECREF</span>(__pyx_t_7);\n",
       "  <span class='pyx_macro_api'>__Pyx_XDECREF</span>(__pyx_t_8);\n",
       "  __PYX_XDEC_MEMVIEW(&amp;__pyx_t_9, 1);\n",
       "  __PYX_XDEC_MEMVIEW(&amp;__pyx_t_10, 1);\n",
       "  { PyObject *__pyx_type, *__pyx_value, *__pyx_tb;\n",
       "    __Pyx_PyThreadState_declare\n",
       "    __Pyx_PyThreadState_assign\n",
       "    <span class='pyx_c_api'>__Pyx_ErrFetch</span>(&amp;__pyx_type, &amp;__pyx_value, &amp;__pyx_tb);\n",
       "    <span class='pyx_c_api'>__Pyx_SafeReleaseBuffer</span>(&amp;__pyx_pybuffernd_dets.rcbuffer-&gt;pybuffer);\n",
       "  <span class='pyx_c_api'>__Pyx_ErrRestore</span>(__pyx_type, __pyx_value, __pyx_tb);}\n",
       "  <span class='pyx_c_api'>__Pyx_AddTraceback</span>(\"_cython_magic_94f57fbe7e3614554eedac9e3346e5ec.nms_cpu\", __pyx_clineno, __pyx_lineno, __pyx_filename);\n",
       "  __pyx_r = NULL;\n",
       "  goto __pyx_L2;\n",
       "  __pyx_L0:;\n",
       "  <span class='pyx_c_api'>__Pyx_SafeReleaseBuffer</span>(&amp;__pyx_pybuffernd_dets.rcbuffer-&gt;pybuffer);\n",
       "  __pyx_L2:;\n",
       "  <span class='pyx_macro_api'>__Pyx_XDECREF</span>(__pyx_v_scores);\n",
       "  <span class='pyx_macro_api'>__Pyx_XDECREF</span>(__pyx_v_x1);\n",
       "  <span class='pyx_macro_api'>__Pyx_XDECREF</span>(__pyx_v_y1);\n",
       "  <span class='pyx_macro_api'>__Pyx_XDECREF</span>(__pyx_v_x2);\n",
       "  <span class='pyx_macro_api'>__Pyx_XDECREF</span>(__pyx_v_y2);\n",
       "  <span class='pyx_macro_api'>__Pyx_XDECREF</span>(__pyx_v_areas);\n",
       "  __PYX_XDEC_MEMVIEW(&amp;__pyx_v_areas_view, 1);\n",
       "  <span class='pyx_macro_api'>__Pyx_XDECREF</span>(__pyx_v_order);\n",
       "  __PYX_XDEC_MEMVIEW(&amp;__pyx_v_order_view, 1);\n",
       "  <span class='pyx_macro_api'>__Pyx_XDECREF</span>(__pyx_v_suppressed);\n",
       "  __PYX_XDEC_MEMVIEW(&amp;__pyx_v_suppressed_view, 1);\n",
       "  __PYX_XDEC_MEMVIEW(&amp;__pyx_v_x1_view, 1);\n",
       "  __PYX_XDEC_MEMVIEW(&amp;__pyx_v_y1_view, 1);\n",
       "  __PYX_XDEC_MEMVIEW(&amp;__pyx_v_x2_view, 1);\n",
       "  __PYX_XDEC_MEMVIEW(&amp;__pyx_v_y2_view, 1);\n",
       "  <span class='refnanny'>__Pyx_XGIVEREF</span>(__pyx_r);\n",
       "  <span class='refnanny'>__Pyx_RefNannyFinishContext</span>();\n",
       "  return __pyx_r;\n",
       "}\n",
       "/* … */\n",
       "  __pyx_tuple__36 = <span class='py_c_api'>PyTuple_Pack</span>(35, __pyx_n_s_dets, __pyx_n_s_thresh, __pyx_n_s_scores, __pyx_n_s_x1, __pyx_n_s_y1, __pyx_n_s_x2, __pyx_n_s_y2, __pyx_n_s_areas, __pyx_n_s_areas_view, __pyx_n_s_order, __pyx_n_s_order_view, __pyx_n_s_ndets, __pyx_n_s_suppressed, __pyx_n_s_suppressed_view, __pyx_n_s_ix1, __pyx_n_s_iy1, __pyx_n_s_ix2, __pyx_n_s_iy2, __pyx_n_s_iarea, __pyx_n_s_xx1, __pyx_n_s_yy1, __pyx_n_s_xx2, __pyx_n_s_yy2, __pyx_n_s_w, __pyx_n_s_h, __pyx_n_s_inter, __pyx_n_s_ovr, __pyx_n_s_i, __pyx_n_s_j, __pyx_n_s_i_2, __pyx_n_s_j_2, __pyx_n_s_x1_view, __pyx_n_s_y1_view, __pyx_n_s_x2_view, __pyx_n_s_y2_view);<span class='error_goto'> if (unlikely(!__pyx_tuple__36)) __PYX_ERR(0, 13, __pyx_L1_error)</span>\n",
       "  <span class='refnanny'>__Pyx_GOTREF</span>(__pyx_tuple__36);\n",
       "  <span class='refnanny'>__Pyx_GIVEREF</span>(__pyx_tuple__36);\n",
       "/* … */\n",
       "  __pyx_t_1 = <span class='pyx_c_api'>__Pyx_PyDict_NewPresized</span>(2);<span class='error_goto'> if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 13, __pyx_L1_error)</span>\n",
       "  <span class='refnanny'>__Pyx_GOTREF</span>(__pyx_t_1);\n",
       "  __pyx_t_2 = __pyx_FusedFunction_NewEx(&amp;__pyx_fuse_0__pyx_mdef_46_cython_magic_94f57fbe7e3614554eedac9e3346e5ec_3nms_cpu, 0, __pyx_n_s_nms_cpu, NULL, __pyx_n_s_cython_magic_94f57fbe7e3614554e, __pyx_d, ((PyObject *)__pyx_codeobj__37));<span class='error_goto'> if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 13, __pyx_L1_error)</span>\n",
       "  <span class='refnanny'>__Pyx_GOTREF</span>(__pyx_t_2);\n",
       "  <span class='pyx_c_api'>__Pyx_CyFunction_SetDefaultsTuple</span>(__pyx_t_2, __pyx_empty_tuple);\n",
       "  if (<span class='py_c_api'>PyDict_SetItem</span>(__pyx_t_1, __pyx_n_s_float, __pyx_t_2) &lt; 0) <span class='error_goto'>__PYX_ERR(0, 13, __pyx_L1_error)</span>\n",
       "  <span class='pyx_macro_api'>__Pyx_DECREF</span>(__pyx_t_2); __pyx_t_2 = 0;\n",
       "  __pyx_t_2 = __pyx_FusedFunction_NewEx(&amp;__pyx_fuse_1__pyx_mdef_46_cython_magic_94f57fbe7e3614554eedac9e3346e5ec_5nms_cpu, 0, __pyx_n_s_nms_cpu, NULL, __pyx_n_s_cython_magic_94f57fbe7e3614554e, __pyx_d, ((PyObject *)__pyx_codeobj__37));<span class='error_goto'> if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 13, __pyx_L1_error)</span>\n",
       "  <span class='refnanny'>__Pyx_GOTREF</span>(__pyx_t_2);\n",
       "  <span class='pyx_c_api'>__Pyx_CyFunction_SetDefaultsTuple</span>(__pyx_t_2, __pyx_empty_tuple);\n",
       "  if (<span class='py_c_api'>PyDict_SetItem</span>(__pyx_t_1, __pyx_n_s_double, __pyx_t_2) &lt; 0) <span class='error_goto'>__PYX_ERR(0, 13, __pyx_L1_error)</span>\n",
       "  <span class='pyx_macro_api'>__Pyx_DECREF</span>(__pyx_t_2); __pyx_t_2 = 0;\n",
       "  __pyx_t_2 = __pyx_FusedFunction_NewEx(&amp;__pyx_mdef_46_cython_magic_94f57fbe7e3614554eedac9e3346e5ec_1nms_cpu, 0, __pyx_n_s_nms_cpu, NULL, __pyx_n_s_cython_magic_94f57fbe7e3614554e, __pyx_d, ((PyObject *)__pyx_codeobj__37));<span class='error_goto'> if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 13, __pyx_L1_error)</span>\n",
       "  <span class='refnanny'>__Pyx_GOTREF</span>(__pyx_t_2);\n",
       "  <span class='pyx_c_api'>__Pyx_CyFunction_SetDefaultsTuple</span>(__pyx_t_2, __pyx_empty_tuple);\n",
       "  ((__pyx_FusedFunctionObject *) __pyx_t_2)-&gt;__signatures__ = __pyx_t_1;\n",
       "  <span class='refnanny'>__Pyx_GIVEREF</span>(__pyx_t_1);\n",
       "  if (<span class='py_c_api'>PyDict_SetItem</span>(__pyx_d, __pyx_n_s_nms_cpu, __pyx_t_2) &lt; 0) <span class='error_goto'>__PYX_ERR(0, 13, __pyx_L1_error)</span>\n",
       "  <span class='pyx_macro_api'>__Pyx_DECREF</span>(__pyx_t_2); __pyx_t_2 = 0;\n",
       "  __pyx_codeobj__37 = (PyObject*)<span class='pyx_c_api'>__Pyx_PyCode_New</span>(2, 0, 35, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__36, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_Users_hrvvi_ipython_cython__cyt, __pyx_n_s_nms_cpu, 13, __pyx_empty_bytes);<span class='error_goto'> if (unlikely(!__pyx_codeobj__37)) __PYX_ERR(0, 13, __pyx_L1_error)</span>\n",
       "</pre><pre class=\"cython line score-0\">&#xA0;<span class=\"\">14</span>: </pre>\n",
       "<pre class=\"cython line score-0\" onclick=\"(function(s){s.display=s.display==='block'?'none':'block'})(this.nextElementSibling.style)\">+<span class=\"\">15</span>:     <span class=\"k\">if</span> <span class=\"n\">dets</span><span class=\"o\">.</span><span class=\"n\">shape</span><span class=\"p\">[</span><span class=\"mf\">0</span><span class=\"p\">]</span> <span class=\"o\">==</span> <span class=\"mf\">0</span><span class=\"p\">:</span></pre>\n",
       "<pre class='cython code score-0 '>  __pyx_t_1 = (((__pyx_v_dets-&gt;dimensions[0]) == 0) != 0);\n",
       "  if (__pyx_t_1) {\n",
       "/* … */\n",
       "  }\n",
       "/* … */\n",
       "  __pyx_t_1 = (((__pyx_v_dets-&gt;dimensions[0]) == 0) != 0);\n",
       "  if (__pyx_t_1) {\n",
       "/* … */\n",
       "  }\n",
       "</pre><pre class=\"cython line score-12\" onclick=\"(function(s){s.display=s.display==='block'?'none':'block'})(this.nextElementSibling.style)\">+<span class=\"\">16</span>:         <span class=\"k\">return</span> <span class=\"p\">[]</span></pre>\n",
       "<pre class='cython code score-12 '>    <span class='pyx_macro_api'>__Pyx_XDECREF</span>(__pyx_r);\n",
       "    __pyx_t_2 = <span class='py_c_api'>PyList_New</span>(0);<span class='error_goto'> if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 16, __pyx_L1_error)</span>\n",
       "    <span class='refnanny'>__Pyx_GOTREF</span>(__pyx_t_2);\n",
       "    __pyx_r = __pyx_t_2;\n",
       "    __pyx_t_2 = 0;\n",
       "    goto __pyx_L0;\n",
       "/* … */\n",
       "    <span class='pyx_macro_api'>__Pyx_XDECREF</span>(__pyx_r);\n",
       "    __pyx_t_2 = <span class='py_c_api'>PyList_New</span>(0);<span class='error_goto'> if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 16, __pyx_L1_error)</span>\n",
       "    <span class='refnanny'>__Pyx_GOTREF</span>(__pyx_t_2);\n",
       "    __pyx_r = __pyx_t_2;\n",
       "    __pyx_t_2 = 0;\n",
       "    goto __pyx_L0;\n",
       "</pre><pre class=\"cython line score-14\" onclick=\"(function(s){s.display=s.display==='block'?'none':'block'})(this.nextElementSibling.style)\">+<span class=\"\">17</span>:     <span class=\"n\">scores</span> <span class=\"o\">=</span> <span class=\"n\">dets</span><span class=\"p\">[:,</span> <span class=\"mf\">0</span><span class=\"p\">]</span></pre>\n",
       "<pre class='cython code score-14 '>  __pyx_slice__5 = <span class='py_c_api'>PySlice_New</span>(Py_None, Py_None, Py_None);<span class='error_goto'> if (unlikely(!__pyx_slice__5)) __PYX_ERR(0, 17, __pyx_L1_error)</span>\n",
       "  <span class='refnanny'>__Pyx_GOTREF</span>(__pyx_slice__5);\n",
       "  <span class='refnanny'>__Pyx_GIVEREF</span>(__pyx_slice__5);\n",
       "/* … */\n",
       "  __pyx_t_2 = <span class='pyx_c_api'>__Pyx_PyObject_GetItem</span>(((PyObject *)__pyx_v_dets), __pyx_tuple__6);<span class='error_goto'> if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 17, __pyx_L1_error)</span>\n",
       "  <span class='refnanny'>__Pyx_GOTREF</span>(__pyx_t_2);\n",
       "  __pyx_v_scores = __pyx_t_2;\n",
       "  __pyx_t_2 = 0;\n",
       "  __pyx_tuple__6 = <span class='py_c_api'>PyTuple_Pack</span>(2, __pyx_slice__5, __pyx_int_0);<span class='error_goto'> if (unlikely(!__pyx_tuple__6)) __PYX_ERR(0, 17, __pyx_L1_error)</span>\n",
       "  <span class='refnanny'>__Pyx_GOTREF</span>(__pyx_tuple__6);\n",
       "  <span class='refnanny'>__Pyx_GIVEREF</span>(__pyx_tuple__6);\n",
       "/* … */\n",
       "  __pyx_t_2 = <span class='pyx_c_api'>__Pyx_PyObject_GetItem</span>(((PyObject *)__pyx_v_dets), __pyx_tuple__6);<span class='error_goto'> if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 17, __pyx_L1_error)</span>\n",
       "  <span class='refnanny'>__Pyx_GOTREF</span>(__pyx_t_2);\n",
       "  __pyx_v_scores = __pyx_t_2;\n",
       "  __pyx_t_2 = 0;\n",
       "</pre><pre class=\"cython line score-9\" onclick=\"(function(s){s.display=s.display==='block'?'none':'block'})(this.nextElementSibling.style)\">+<span class=\"\">18</span>:     <span class=\"n\">x1</span> <span class=\"o\">=</span> <span class=\"n\">dets</span><span class=\"p\">[:,</span> <span class=\"mf\">1</span><span class=\"p\">]</span></pre>\n",
       "<pre class='cython code score-9 '>  __pyx_t_2 = <span class='pyx_c_api'>__Pyx_PyObject_GetItem</span>(((PyObject *)__pyx_v_dets), __pyx_tuple__7);<span class='error_goto'> if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 18, __pyx_L1_error)</span>\n",
       "  <span class='refnanny'>__Pyx_GOTREF</span>(__pyx_t_2);\n",
       "  __pyx_v_x1 = __pyx_t_2;\n",
       "  __pyx_t_2 = 0;\n",
       "/* … */\n",
       "  __pyx_tuple__7 = <span class='py_c_api'>PyTuple_Pack</span>(2, __pyx_slice__5, __pyx_int_1);<span class='error_goto'> if (unlikely(!__pyx_tuple__7)) __PYX_ERR(0, 18, __pyx_L1_error)</span>\n",
       "  <span class='refnanny'>__Pyx_GOTREF</span>(__pyx_tuple__7);\n",
       "  <span class='refnanny'>__Pyx_GIVEREF</span>(__pyx_tuple__7);\n",
       "/* … */\n",
       "  __pyx_t_2 = <span class='pyx_c_api'>__Pyx_PyObject_GetItem</span>(((PyObject *)__pyx_v_dets), __pyx_tuple__7);<span class='error_goto'> if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 18, __pyx_L1_error)</span>\n",
       "  <span class='refnanny'>__Pyx_GOTREF</span>(__pyx_t_2);\n",
       "  __pyx_v_x1 = __pyx_t_2;\n",
       "  __pyx_t_2 = 0;\n",
       "</pre><pre class=\"cython line score-9\" onclick=\"(function(s){s.display=s.display==='block'?'none':'block'})(this.nextElementSibling.style)\">+<span class=\"\">19</span>:     <span class=\"n\">y1</span> <span class=\"o\">=</span> <span class=\"n\">dets</span><span class=\"p\">[:,</span> <span class=\"mf\">2</span><span class=\"p\">]</span></pre>\n",
       "<pre class='cython code score-9 '>  __pyx_t_2 = <span class='pyx_c_api'>__Pyx_PyObject_GetItem</span>(((PyObject *)__pyx_v_dets), __pyx_tuple__8);<span class='error_goto'> if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 19, __pyx_L1_error)</span>\n",
       "  <span class='refnanny'>__Pyx_GOTREF</span>(__pyx_t_2);\n",
       "  __pyx_v_y1 = __pyx_t_2;\n",
       "  __pyx_t_2 = 0;\n",
       "/* … */\n",
       "  __pyx_tuple__8 = <span class='py_c_api'>PyTuple_Pack</span>(2, __pyx_slice__5, __pyx_int_2);<span class='error_goto'> if (unlikely(!__pyx_tuple__8)) __PYX_ERR(0, 19, __pyx_L1_error)</span>\n",
       "  <span class='refnanny'>__Pyx_GOTREF</span>(__pyx_tuple__8);\n",
       "  <span class='refnanny'>__Pyx_GIVEREF</span>(__pyx_tuple__8);\n",
       "/* … */\n",
       "  __pyx_t_2 = <span class='pyx_c_api'>__Pyx_PyObject_GetItem</span>(((PyObject *)__pyx_v_dets), __pyx_tuple__8);<span class='error_goto'> if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 19, __pyx_L1_error)</span>\n",
       "  <span class='refnanny'>__Pyx_GOTREF</span>(__pyx_t_2);\n",
       "  __pyx_v_y1 = __pyx_t_2;\n",
       "  __pyx_t_2 = 0;\n",
       "</pre><pre class=\"cython line score-9\" onclick=\"(function(s){s.display=s.display==='block'?'none':'block'})(this.nextElementSibling.style)\">+<span class=\"\">20</span>:     <span class=\"n\">x2</span> <span class=\"o\">=</span> <span class=\"n\">dets</span><span class=\"p\">[:,</span> <span class=\"mf\">3</span><span class=\"p\">]</span></pre>\n",
       "<pre class='cython code score-9 '>  __pyx_t_2 = <span class='pyx_c_api'>__Pyx_PyObject_GetItem</span>(((PyObject *)__pyx_v_dets), __pyx_tuple__9);<span class='error_goto'> if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 20, __pyx_L1_error)</span>\n",
       "  <span class='refnanny'>__Pyx_GOTREF</span>(__pyx_t_2);\n",
       "  __pyx_v_x2 = __pyx_t_2;\n",
       "  __pyx_t_2 = 0;\n",
       "/* … */\n",
       "  __pyx_tuple__9 = <span class='py_c_api'>PyTuple_Pack</span>(2, __pyx_slice__5, __pyx_int_3);<span class='error_goto'> if (unlikely(!__pyx_tuple__9)) __PYX_ERR(0, 20, __pyx_L1_error)</span>\n",
       "  <span class='refnanny'>__Pyx_GOTREF</span>(__pyx_tuple__9);\n",
       "  <span class='refnanny'>__Pyx_GIVEREF</span>(__pyx_tuple__9);\n",
       "/* … */\n",
       "  __pyx_t_2 = <span class='pyx_c_api'>__Pyx_PyObject_GetItem</span>(((PyObject *)__pyx_v_dets), __pyx_tuple__9);<span class='error_goto'> if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 20, __pyx_L1_error)</span>\n",
       "  <span class='refnanny'>__Pyx_GOTREF</span>(__pyx_t_2);\n",
       "  __pyx_v_x2 = __pyx_t_2;\n",
       "  __pyx_t_2 = 0;\n",
       "</pre><pre class=\"cython line score-9\" onclick=\"(function(s){s.display=s.display==='block'?'none':'block'})(this.nextElementSibling.style)\">+<span class=\"\">21</span>:     <span class=\"n\">y2</span> <span class=\"o\">=</span> <span class=\"n\">dets</span><span class=\"p\">[:,</span> <span class=\"mf\">4</span><span class=\"p\">]</span></pre>\n",
       "<pre class='cython code score-9 '>  __pyx_t_2 = <span class='pyx_c_api'>__Pyx_PyObject_GetItem</span>(((PyObject *)__pyx_v_dets), __pyx_tuple__10);<span class='error_goto'> if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 21, __pyx_L1_error)</span>\n",
       "  <span class='refnanny'>__Pyx_GOTREF</span>(__pyx_t_2);\n",
       "  __pyx_v_y2 = __pyx_t_2;\n",
       "  __pyx_t_2 = 0;\n",
       "/* … */\n",
       "  __pyx_tuple__10 = <span class='py_c_api'>PyTuple_Pack</span>(2, __pyx_slice__5, __pyx_int_4);<span class='error_goto'> if (unlikely(!__pyx_tuple__10)) __PYX_ERR(0, 21, __pyx_L1_error)</span>\n",
       "  <span class='refnanny'>__Pyx_GOTREF</span>(__pyx_tuple__10);\n",
       "  <span class='refnanny'>__Pyx_GIVEREF</span>(__pyx_tuple__10);\n",
       "/* … */\n",
       "  __pyx_t_2 = <span class='pyx_c_api'>__Pyx_PyObject_GetItem</span>(((PyObject *)__pyx_v_dets), __pyx_tuple__10);<span class='error_goto'> if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 21, __pyx_L1_error)</span>\n",
       "  <span class='refnanny'>__Pyx_GOTREF</span>(__pyx_t_2);\n",
       "  __pyx_v_y2 = __pyx_t_2;\n",
       "  __pyx_t_2 = 0;\n",
       "</pre><pre class=\"cython line score-0\">&#xA0;<span class=\"\">22</span>: </pre>\n",
       "<pre class=\"cython line score-46\" onclick=\"(function(s){s.display=s.display==='block'?'none':'block'})(this.nextElementSibling.style)\">+<span class=\"\">23</span>:     <span class=\"n\">areas</span> <span class=\"o\">=</span> <span class=\"p\">(</span><span class=\"n\">x2</span> <span class=\"o\">-</span> <span class=\"n\">x1</span> <span class=\"o\">+</span> <span class=\"mf\">1</span><span class=\"p\">)</span> <span class=\"o\">*</span> <span class=\"p\">(</span><span class=\"n\">y2</span> <span class=\"o\">-</span> <span class=\"n\">y1</span> <span class=\"o\">+</span> <span class=\"mf\">1</span><span class=\"p\">)</span></pre>\n",
       "<pre class='cython code score-46 '>  __pyx_t_2 = <span class='py_c_api'>PyNumber_Subtract</span>(__pyx_v_x2, __pyx_v_x1);<span class='error_goto'> if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 23, __pyx_L1_error)</span>\n",
       "  <span class='refnanny'>__Pyx_GOTREF</span>(__pyx_t_2);\n",
       "  __pyx_t_3 = <span class='pyx_c_api'>__Pyx_PyInt_AddObjC</span>(__pyx_t_2, __pyx_int_1, 1, 0, 0);<span class='error_goto'> if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 23, __pyx_L1_error)</span>\n",
       "  <span class='refnanny'>__Pyx_GOTREF</span>(__pyx_t_3);\n",
       "  <span class='pyx_macro_api'>__Pyx_DECREF</span>(__pyx_t_2); __pyx_t_2 = 0;\n",
       "  __pyx_t_2 = <span class='py_c_api'>PyNumber_Subtract</span>(__pyx_v_y2, __pyx_v_y1);<span class='error_goto'> if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 23, __pyx_L1_error)</span>\n",
       "  <span class='refnanny'>__Pyx_GOTREF</span>(__pyx_t_2);\n",
       "  __pyx_t_4 = <span class='pyx_c_api'>__Pyx_PyInt_AddObjC</span>(__pyx_t_2, __pyx_int_1, 1, 0, 0);<span class='error_goto'> if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 23, __pyx_L1_error)</span>\n",
       "  <span class='refnanny'>__Pyx_GOTREF</span>(__pyx_t_4);\n",
       "  <span class='pyx_macro_api'>__Pyx_DECREF</span>(__pyx_t_2); __pyx_t_2 = 0;\n",
       "  __pyx_t_2 = <span class='py_c_api'>PyNumber_Multiply</span>(__pyx_t_3, __pyx_t_4);<span class='error_goto'> if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 23, __pyx_L1_error)</span>\n",
       "  <span class='refnanny'>__Pyx_GOTREF</span>(__pyx_t_2);\n",
       "  <span class='pyx_macro_api'>__Pyx_DECREF</span>(__pyx_t_3); __pyx_t_3 = 0;\n",
       "  <span class='pyx_macro_api'>__Pyx_DECREF</span>(__pyx_t_4); __pyx_t_4 = 0;\n",
       "  __pyx_v_areas = __pyx_t_2;\n",
       "  __pyx_t_2 = 0;\n",
       "/* … */\n",
       "  __pyx_t_2 = <span class='py_c_api'>PyNumber_Subtract</span>(__pyx_v_x2, __pyx_v_x1);<span class='error_goto'> if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 23, __pyx_L1_error)</span>\n",
       "  <span class='refnanny'>__Pyx_GOTREF</span>(__pyx_t_2);\n",
       "  __pyx_t_3 = <span class='pyx_c_api'>__Pyx_PyInt_AddObjC</span>(__pyx_t_2, __pyx_int_1, 1, 0, 0);<span class='error_goto'> if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 23, __pyx_L1_error)</span>\n",
       "  <span class='refnanny'>__Pyx_GOTREF</span>(__pyx_t_3);\n",
       "  <span class='pyx_macro_api'>__Pyx_DECREF</span>(__pyx_t_2); __pyx_t_2 = 0;\n",
       "  __pyx_t_2 = <span class='py_c_api'>PyNumber_Subtract</span>(__pyx_v_y2, __pyx_v_y1);<span class='error_goto'> if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 23, __pyx_L1_error)</span>\n",
       "  <span class='refnanny'>__Pyx_GOTREF</span>(__pyx_t_2);\n",
       "  __pyx_t_4 = <span class='pyx_c_api'>__Pyx_PyInt_AddObjC</span>(__pyx_t_2, __pyx_int_1, 1, 0, 0);<span class='error_goto'> if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 23, __pyx_L1_error)</span>\n",
       "  <span class='refnanny'>__Pyx_GOTREF</span>(__pyx_t_4);\n",
       "  <span class='pyx_macro_api'>__Pyx_DECREF</span>(__pyx_t_2); __pyx_t_2 = 0;\n",
       "  __pyx_t_2 = <span class='py_c_api'>PyNumber_Multiply</span>(__pyx_t_3, __pyx_t_4);<span class='error_goto'> if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 23, __pyx_L1_error)</span>\n",
       "  <span class='refnanny'>__Pyx_GOTREF</span>(__pyx_t_2);\n",
       "  <span class='pyx_macro_api'>__Pyx_DECREF</span>(__pyx_t_3); __pyx_t_3 = 0;\n",
       "  <span class='pyx_macro_api'>__Pyx_DECREF</span>(__pyx_t_4); __pyx_t_4 = 0;\n",
       "  __pyx_v_areas = __pyx_t_2;\n",
       "  __pyx_t_2 = 0;\n",
       "</pre><pre class=\"cython line score-4\" onclick=\"(function(s){s.display=s.display==='block'?'none':'block'})(this.nextElementSibling.style)\">+<span class=\"\">24</span>:     <span class=\"k\">cdef</span> <span class=\"kt\">scalar_t</span>[<span class=\"p\">::</span><span class=\"mf\">1</span><span class=\"p\">]</span> <span class=\"n\">areas_view</span> <span class=\"o\">=</span> <span class=\"n\">areas</span></pre>\n",
       "<pre class='cython code score-4 '>  __pyx_t_5 = <span class='pyx_c_api'>__Pyx_PyObject_to_MemoryviewSlice_dc_float</span>(__pyx_v_areas, PyBUF_WRITABLE);<span class='error_goto'> if (unlikely(!__pyx_t_5.memview)) __PYX_ERR(0, 24, __pyx_L1_error)</span>\n",
       "  __pyx_v_areas_view = __pyx_t_5;\n",
       "  __pyx_t_5.memview = NULL;\n",
       "  __pyx_t_5.data = NULL;\n",
       "/* … */\n",
       "  __pyx_t_5 = <span class='pyx_c_api'>__Pyx_PyObject_to_MemoryviewSlice_dc_double</span>(__pyx_v_areas, PyBUF_WRITABLE);<span class='error_goto'> if (unlikely(!__pyx_t_5.memview)) __PYX_ERR(0, 24, __pyx_L1_error)</span>\n",
       "  __pyx_v_areas_view = __pyx_t_5;\n",
       "  __pyx_t_5.memview = NULL;\n",
       "  __pyx_t_5.data = NULL;\n",
       "</pre><pre class=\"cython line score-47\" onclick=\"(function(s){s.display=s.display==='block'?'none':'block'})(this.nextElementSibling.style)\">+<span class=\"\">25</span>:     <span class=\"n\">order</span> <span class=\"o\">=</span> <span class=\"n\">scores</span><span class=\"o\">.</span><span class=\"n\">argsort</span><span class=\"p\">()[::</span><span class=\"o\">-</span><span class=\"mf\">1</span><span class=\"p\">]</span></pre>\n",
       "<pre class='cython code score-47 '>  __pyx_t_4 = <span class='pyx_c_api'>__Pyx_PyObject_GetAttrStr</span>(__pyx_v_scores, __pyx_n_s_argsort);<span class='error_goto'> if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 25, __pyx_L1_error)</span>\n",
       "  <span class='refnanny'>__Pyx_GOTREF</span>(__pyx_t_4);\n",
       "  __pyx_t_3 = NULL;\n",
       "  if (CYTHON_UNPACK_METHODS &amp;&amp; likely(<span class='py_c_api'>PyMethod_Check</span>(__pyx_t_4))) {\n",
       "    __pyx_t_3 = <span class='py_macro_api'>PyMethod_GET_SELF</span>(__pyx_t_4);\n",
       "    if (likely(__pyx_t_3)) {\n",
       "      PyObject* function = <span class='py_macro_api'>PyMethod_GET_FUNCTION</span>(__pyx_t_4);\n",
       "      <span class='pyx_macro_api'>__Pyx_INCREF</span>(__pyx_t_3);\n",
       "      <span class='pyx_macro_api'>__Pyx_INCREF</span>(function);\n",
       "      <span class='pyx_macro_api'>__Pyx_DECREF_SET</span>(__pyx_t_4, function);\n",
       "    }\n",
       "  }\n",
       "  __pyx_t_2 = (__pyx_t_3) ? <span class='pyx_c_api'>__Pyx_PyObject_CallOneArg</span>(__pyx_t_4, __pyx_t_3) : <span class='pyx_c_api'>__Pyx_PyObject_CallNoArg</span>(__pyx_t_4);\n",
       "  <span class='pyx_macro_api'>__Pyx_XDECREF</span>(__pyx_t_3); __pyx_t_3 = 0;\n",
       "  if (unlikely(!__pyx_t_2)) <span class='error_goto'>__PYX_ERR(0, 25, __pyx_L1_error)</span>\n",
       "  <span class='refnanny'>__Pyx_GOTREF</span>(__pyx_t_2);\n",
       "  <span class='pyx_macro_api'>__Pyx_DECREF</span>(__pyx_t_4); __pyx_t_4 = 0;\n",
       "  __pyx_t_4 = <span class='pyx_c_api'>__Pyx_PyObject_GetItem</span>(__pyx_t_2, __pyx_slice__11);<span class='error_goto'> if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 25, __pyx_L1_error)</span>\n",
       "  <span class='refnanny'>__Pyx_GOTREF</span>(__pyx_t_4);\n",
       "  <span class='pyx_macro_api'>__Pyx_DECREF</span>(__pyx_t_2); __pyx_t_2 = 0;\n",
       "  __pyx_v_order = __pyx_t_4;\n",
       "  __pyx_t_4 = 0;\n",
       "/* … */\n",
       "  __pyx_t_4 = <span class='pyx_c_api'>__Pyx_PyObject_GetAttrStr</span>(__pyx_v_scores, __pyx_n_s_argsort);<span class='error_goto'> if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 25, __pyx_L1_error)</span>\n",
       "  <span class='refnanny'>__Pyx_GOTREF</span>(__pyx_t_4);\n",
       "  __pyx_t_3 = NULL;\n",
       "  if (CYTHON_UNPACK_METHODS &amp;&amp; likely(<span class='py_c_api'>PyMethod_Check</span>(__pyx_t_4))) {\n",
       "    __pyx_t_3 = <span class='py_macro_api'>PyMethod_GET_SELF</span>(__pyx_t_4);\n",
       "    if (likely(__pyx_t_3)) {\n",
       "      PyObject* function = <span class='py_macro_api'>PyMethod_GET_FUNCTION</span>(__pyx_t_4);\n",
       "      <span class='pyx_macro_api'>__Pyx_INCREF</span>(__pyx_t_3);\n",
       "      <span class='pyx_macro_api'>__Pyx_INCREF</span>(function);\n",
       "      <span class='pyx_macro_api'>__Pyx_DECREF_SET</span>(__pyx_t_4, function);\n",
       "    }\n",
       "  }\n",
       "  __pyx_t_2 = (__pyx_t_3) ? <span class='pyx_c_api'>__Pyx_PyObject_CallOneArg</span>(__pyx_t_4, __pyx_t_3) : <span class='pyx_c_api'>__Pyx_PyObject_CallNoArg</span>(__pyx_t_4);\n",
       "  <span class='pyx_macro_api'>__Pyx_XDECREF</span>(__pyx_t_3); __pyx_t_3 = 0;\n",
       "  if (unlikely(!__pyx_t_2)) <span class='error_goto'>__PYX_ERR(0, 25, __pyx_L1_error)</span>\n",
       "  <span class='refnanny'>__Pyx_GOTREF</span>(__pyx_t_2);\n",
       "  <span class='pyx_macro_api'>__Pyx_DECREF</span>(__pyx_t_4); __pyx_t_4 = 0;\n",
       "  __pyx_t_4 = <span class='pyx_c_api'>__Pyx_PyObject_GetItem</span>(__pyx_t_2, __pyx_slice__11);<span class='error_goto'> if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 25, __pyx_L1_error)</span>\n",
       "  <span class='refnanny'>__Pyx_GOTREF</span>(__pyx_t_4);\n",
       "  <span class='pyx_macro_api'>__Pyx_DECREF</span>(__pyx_t_2); __pyx_t_2 = 0;\n",
       "  __pyx_v_order = __pyx_t_4;\n",
       "  __pyx_t_4 = 0;\n",
       "/* … */\n",
       "  __pyx_slice__11 = <span class='py_c_api'>PySlice_New</span>(Py_None, Py_None, __pyx_int_neg_1);<span class='error_goto'> if (unlikely(!__pyx_slice__11)) __PYX_ERR(0, 25, __pyx_L1_error)</span>\n",
       "  <span class='refnanny'>__Pyx_GOTREF</span>(__pyx_slice__11);\n",
       "  <span class='refnanny'>__Pyx_GIVEREF</span>(__pyx_slice__11);\n",
       "</pre><pre class=\"cython line score-4\" onclick=\"(function(s){s.display=s.display==='block'?'none':'block'})(this.nextElementSibling.style)\">+<span class=\"\">26</span>:     <span class=\"k\">cdef</span> <span class=\"kt\">long</span>[<span class=\"p\">::]</span> <span class=\"n\">order_view</span> <span class=\"o\">=</span> <span class=\"n\">order</span></pre>\n",
       "<pre class='cython code score-4 '>  __pyx_t_6 = <span class='pyx_c_api'>__Pyx_PyObject_to_MemoryviewSlice_ds_long</span>(__pyx_v_order, PyBUF_WRITABLE);<span class='error_goto'> if (unlikely(!__pyx_t_6.memview)) __PYX_ERR(0, 26, __pyx_L1_error)</span>\n",
       "  __pyx_v_order_view = __pyx_t_6;\n",
       "  __pyx_t_6.memview = NULL;\n",
       "  __pyx_t_6.data = NULL;\n",
       "/* … */\n",
       "  __pyx_t_6 = <span class='pyx_c_api'>__Pyx_PyObject_to_MemoryviewSlice_ds_long</span>(__pyx_v_order, PyBUF_WRITABLE);<span class='error_goto'> if (unlikely(!__pyx_t_6.memview)) __PYX_ERR(0, 26, __pyx_L1_error)</span>\n",
       "  __pyx_v_order_view = __pyx_t_6;\n",
       "  __pyx_t_6.memview = NULL;\n",
       "  __pyx_t_6.data = NULL;\n",
       "</pre><pre class=\"cython line score-0\">&#xA0;<span class=\"\">27</span>: </pre>\n",
       "<pre class=\"cython line score-0\" onclick=\"(function(s){s.display=s.display==='block'?'none':'block'})(this.nextElementSibling.style)\">+<span class=\"\">28</span>:     <span class=\"n\">ndets</span> <span class=\"o\">=</span> <span class=\"n\">dets</span><span class=\"o\">.</span><span class=\"n\">shape</span><span class=\"p\">[</span><span class=\"mf\">0</span><span class=\"p\">]</span></pre>\n",
       "<pre class='cython code score-0 '>  __pyx_v_ndets = (__pyx_v_dets-&gt;dimensions[0]);\n",
       "/* … */\n",
       "  __pyx_v_ndets = (__pyx_v_dets-&gt;dimensions[0]);\n",
       "</pre><pre class=\"cython line score-62\" onclick=\"(function(s){s.display=s.display==='block'?'none':'block'})(this.nextElementSibling.style)\">+<span class=\"\">29</span>:     <span class=\"n\">suppressed</span> <span class=\"o\">=</span> <span class=\"n\">np</span><span class=\"o\">.</span><span class=\"n\">zeros</span><span class=\"p\">((</span><span class=\"n\">ndets</span><span class=\"p\">),</span> <span class=\"n\">dtype</span><span class=\"o\">=</span><span class=\"n\">np</span><span class=\"o\">.</span><span class=\"n\">long</span><span class=\"p\">)</span></pre>\n",
       "<pre class='cython code score-62 '>  <span class='pyx_c_api'>__Pyx_GetModuleGlobalName</span>(__pyx_t_4, __pyx_n_s_np);<span class='error_goto'> if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 29, __pyx_L1_error)</span>\n",
       "  <span class='refnanny'>__Pyx_GOTREF</span>(__pyx_t_4);\n",
       "  __pyx_t_2 = <span class='pyx_c_api'>__Pyx_PyObject_GetAttrStr</span>(__pyx_t_4, __pyx_n_s_zeros);<span class='error_goto'> if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 29, __pyx_L1_error)</span>\n",
       "  <span class='refnanny'>__Pyx_GOTREF</span>(__pyx_t_2);\n",
       "  <span class='pyx_macro_api'>__Pyx_DECREF</span>(__pyx_t_4); __pyx_t_4 = 0;\n",
       "  __pyx_t_4 = <span class='pyx_c_api'>__Pyx_PyInt_From_Py_intptr_t</span>(__pyx_v_ndets);<span class='error_goto'> if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 29, __pyx_L1_error)</span>\n",
       "  <span class='refnanny'>__Pyx_GOTREF</span>(__pyx_t_4);\n",
       "  __pyx_t_3 = <span class='py_c_api'>PyTuple_New</span>(1);<span class='error_goto'> if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 29, __pyx_L1_error)</span>\n",
       "  <span class='refnanny'>__Pyx_GOTREF</span>(__pyx_t_3);\n",
       "  <span class='refnanny'>__Pyx_GIVEREF</span>(__pyx_t_4);\n",
       "  <span class='py_macro_api'>PyTuple_SET_ITEM</span>(__pyx_t_3, 0, __pyx_t_4);\n",
       "  __pyx_t_4 = 0;\n",
       "  __pyx_t_4 = <span class='pyx_c_api'>__Pyx_PyDict_NewPresized</span>(1);<span class='error_goto'> if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 29, __pyx_L1_error)</span>\n",
       "  <span class='refnanny'>__Pyx_GOTREF</span>(__pyx_t_4);\n",
       "  <span class='pyx_c_api'>__Pyx_GetModuleGlobalName</span>(__pyx_t_7, __pyx_n_s_np);<span class='error_goto'> if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 29, __pyx_L1_error)</span>\n",
       "  <span class='refnanny'>__Pyx_GOTREF</span>(__pyx_t_7);\n",
       "  __pyx_t_8 = <span class='pyx_c_api'>__Pyx_PyObject_GetAttrStr</span>(__pyx_t_7, __pyx_n_s_long);<span class='error_goto'> if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 29, __pyx_L1_error)</span>\n",
       "  <span class='refnanny'>__Pyx_GOTREF</span>(__pyx_t_8);\n",
       "  <span class='pyx_macro_api'>__Pyx_DECREF</span>(__pyx_t_7); __pyx_t_7 = 0;\n",
       "  if (<span class='py_c_api'>PyDict_SetItem</span>(__pyx_t_4, __pyx_n_s_dtype, __pyx_t_8) &lt; 0) <span class='error_goto'>__PYX_ERR(0, 29, __pyx_L1_error)</span>\n",
       "  <span class='pyx_macro_api'>__Pyx_DECREF</span>(__pyx_t_8); __pyx_t_8 = 0;\n",
       "  __pyx_t_8 = <span class='pyx_c_api'>__Pyx_PyObject_Call</span>(__pyx_t_2, __pyx_t_3, __pyx_t_4);<span class='error_goto'> if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 29, __pyx_L1_error)</span>\n",
       "  <span class='refnanny'>__Pyx_GOTREF</span>(__pyx_t_8);\n",
       "  <span class='pyx_macro_api'>__Pyx_DECREF</span>(__pyx_t_2); __pyx_t_2 = 0;\n",
       "  <span class='pyx_macro_api'>__Pyx_DECREF</span>(__pyx_t_3); __pyx_t_3 = 0;\n",
       "  <span class='pyx_macro_api'>__Pyx_DECREF</span>(__pyx_t_4); __pyx_t_4 = 0;\n",
       "  __pyx_v_suppressed = __pyx_t_8;\n",
       "  __pyx_t_8 = 0;\n",
       "/* … */\n",
       "  <span class='pyx_c_api'>__Pyx_GetModuleGlobalName</span>(__pyx_t_4, __pyx_n_s_np);<span class='error_goto'> if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 29, __pyx_L1_error)</span>\n",
       "  <span class='refnanny'>__Pyx_GOTREF</span>(__pyx_t_4);\n",
       "  __pyx_t_2 = <span class='pyx_c_api'>__Pyx_PyObject_GetAttrStr</span>(__pyx_t_4, __pyx_n_s_zeros);<span class='error_goto'> if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 29, __pyx_L1_error)</span>\n",
       "  <span class='refnanny'>__Pyx_GOTREF</span>(__pyx_t_2);\n",
       "  <span class='pyx_macro_api'>__Pyx_DECREF</span>(__pyx_t_4); __pyx_t_4 = 0;\n",
       "  __pyx_t_4 = <span class='pyx_c_api'>__Pyx_PyInt_From_Py_intptr_t</span>(__pyx_v_ndets);<span class='error_goto'> if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 29, __pyx_L1_error)</span>\n",
       "  <span class='refnanny'>__Pyx_GOTREF</span>(__pyx_t_4);\n",
       "  __pyx_t_3 = <span class='py_c_api'>PyTuple_New</span>(1);<span class='error_goto'> if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 29, __pyx_L1_error)</span>\n",
       "  <span class='refnanny'>__Pyx_GOTREF</span>(__pyx_t_3);\n",
       "  <span class='refnanny'>__Pyx_GIVEREF</span>(__pyx_t_4);\n",
       "  <span class='py_macro_api'>PyTuple_SET_ITEM</span>(__pyx_t_3, 0, __pyx_t_4);\n",
       "  __pyx_t_4 = 0;\n",
       "  __pyx_t_4 = <span class='pyx_c_api'>__Pyx_PyDict_NewPresized</span>(1);<span class='error_goto'> if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 29, __pyx_L1_error)</span>\n",
       "  <span class='refnanny'>__Pyx_GOTREF</span>(__pyx_t_4);\n",
       "  <span class='pyx_c_api'>__Pyx_GetModuleGlobalName</span>(__pyx_t_7, __pyx_n_s_np);<span class='error_goto'> if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 29, __pyx_L1_error)</span>\n",
       "  <span class='refnanny'>__Pyx_GOTREF</span>(__pyx_t_7);\n",
       "  __pyx_t_8 = <span class='pyx_c_api'>__Pyx_PyObject_GetAttrStr</span>(__pyx_t_7, __pyx_n_s_long);<span class='error_goto'> if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 29, __pyx_L1_error)</span>\n",
       "  <span class='refnanny'>__Pyx_GOTREF</span>(__pyx_t_8);\n",
       "  <span class='pyx_macro_api'>__Pyx_DECREF</span>(__pyx_t_7); __pyx_t_7 = 0;\n",
       "  if (<span class='py_c_api'>PyDict_SetItem</span>(__pyx_t_4, __pyx_n_s_dtype, __pyx_t_8) &lt; 0) <span class='error_goto'>__PYX_ERR(0, 29, __pyx_L1_error)</span>\n",
       "  <span class='pyx_macro_api'>__Pyx_DECREF</span>(__pyx_t_8); __pyx_t_8 = 0;\n",
       "  __pyx_t_8 = <span class='pyx_c_api'>__Pyx_PyObject_Call</span>(__pyx_t_2, __pyx_t_3, __pyx_t_4);<span class='error_goto'> if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 29, __pyx_L1_error)</span>\n",
       "  <span class='refnanny'>__Pyx_GOTREF</span>(__pyx_t_8);\n",
       "  <span class='pyx_macro_api'>__Pyx_DECREF</span>(__pyx_t_2); __pyx_t_2 = 0;\n",
       "  <span class='pyx_macro_api'>__Pyx_DECREF</span>(__pyx_t_3); __pyx_t_3 = 0;\n",
       "  <span class='pyx_macro_api'>__Pyx_DECREF</span>(__pyx_t_4); __pyx_t_4 = 0;\n",
       "  __pyx_v_suppressed = __pyx_t_8;\n",
       "  __pyx_t_8 = 0;\n",
       "</pre><pre class=\"cython line score-4\" onclick=\"(function(s){s.display=s.display==='block'?'none':'block'})(this.nextElementSibling.style)\">+<span class=\"\">30</span>:     <span class=\"k\">cdef</span> <span class=\"kt\">long</span>[<span class=\"p\">::</span><span class=\"mf\">1</span><span class=\"p\">]</span> <span class=\"n\">suppressed_view</span> <span class=\"o\">=</span> <span class=\"n\">suppressed</span></pre>\n",
       "<pre class='cython code score-4 '>  __pyx_t_9 = <span class='pyx_c_api'>__Pyx_PyObject_to_MemoryviewSlice_dc_long</span>(__pyx_v_suppressed, PyBUF_WRITABLE);<span class='error_goto'> if (unlikely(!__pyx_t_9.memview)) __PYX_ERR(0, 30, __pyx_L1_error)</span>\n",
       "  __pyx_v_suppressed_view = __pyx_t_9;\n",
       "  __pyx_t_9.memview = NULL;\n",
       "  __pyx_t_9.data = NULL;\n",
       "/* … */\n",
       "  __pyx_t_9 = <span class='pyx_c_api'>__Pyx_PyObject_to_MemoryviewSlice_dc_long</span>(__pyx_v_suppressed, PyBUF_WRITABLE);<span class='error_goto'> if (unlikely(!__pyx_t_9.memview)) __PYX_ERR(0, 30, __pyx_L1_error)</span>\n",
       "  __pyx_v_suppressed_view = __pyx_t_9;\n",
       "  __pyx_t_9.memview = NULL;\n",
       "  __pyx_t_9.data = NULL;\n",
       "</pre><pre class=\"cython line score-0\">&#xA0;<span class=\"\">31</span>: </pre>\n",
       "<pre class=\"cython line score-0\">&#xA0;<span class=\"\">32</span>:     <span class=\"k\">cdef</span> <span class=\"kt\">scalar_t</span> <span class=\"nf\">ix1</span><span class=\"p\">,</span> <span class=\"nf\">iy1</span><span class=\"p\">,</span> <span class=\"nf\">ix2</span><span class=\"p\">,</span> <span class=\"nf\">iy2</span><span class=\"p\">,</span> <span class=\"nf\">iarea</span><span class=\"p\">,</span> <span class=\"nf\">xx1</span><span class=\"p\">,</span> <span class=\"nf\">yy1</span><span class=\"p\">,</span> <span class=\"nf\">xx2</span><span class=\"p\">,</span> <span class=\"nf\">yy2</span><span class=\"p\">,</span> <span class=\"nf\">w</span><span class=\"p\">,</span> <span class=\"nf\">h</span><span class=\"p\">,</span> <span class=\"nf\">inter</span><span class=\"p\">,</span> <span class=\"nf\">ovr</span></pre>\n",
       "<pre class=\"cython line score-0\">&#xA0;<span class=\"\">33</span>:     <span class=\"k\">cdef</span> <span class=\"kt\">Py_ssize_t</span> <span class=\"nf\">_i</span><span class=\"p\">,</span> <span class=\"nf\">_j</span><span class=\"p\">,</span> <span class=\"nf\">i</span><span class=\"p\">,</span> <span class=\"nf\">j</span></pre>\n",
       "<pre class=\"cython line score-0\">&#xA0;<span class=\"\">34</span>: </pre>\n",
       "<pre class=\"cython line score-4\" onclick=\"(function(s){s.display=s.display==='block'?'none':'block'})(this.nextElementSibling.style)\">+<span class=\"\">35</span>:     <span class=\"k\">cdef</span> <span class=\"kt\">scalar_t</span>[<span class=\"p\">:]</span> <span class=\"n\">x1_view</span> <span class=\"o\">=</span> <span class=\"n\">x1</span></pre>\n",
       "<pre class='cython code score-4 '>  __pyx_t_10 = <span class='pyx_c_api'>__Pyx_PyObject_to_MemoryviewSlice_ds_float</span>(__pyx_v_x1, PyBUF_WRITABLE);<span class='error_goto'> if (unlikely(!__pyx_t_10.memview)) __PYX_ERR(0, 35, __pyx_L1_error)</span>\n",
       "  __pyx_v_x1_view = __pyx_t_10;\n",
       "  __pyx_t_10.memview = NULL;\n",
       "  __pyx_t_10.data = NULL;\n",
       "/* … */\n",
       "  __pyx_t_10 = <span class='pyx_c_api'>__Pyx_PyObject_to_MemoryviewSlice_ds_double</span>(__pyx_v_x1, PyBUF_WRITABLE);<span class='error_goto'> if (unlikely(!__pyx_t_10.memview)) __PYX_ERR(0, 35, __pyx_L1_error)</span>\n",
       "  __pyx_v_x1_view = __pyx_t_10;\n",
       "  __pyx_t_10.memview = NULL;\n",
       "  __pyx_t_10.data = NULL;\n",
       "</pre><pre class=\"cython line score-4\" onclick=\"(function(s){s.display=s.display==='block'?'none':'block'})(this.nextElementSibling.style)\">+<span class=\"\">36</span>:     <span class=\"k\">cdef</span> <span class=\"kt\">scalar_t</span>[<span class=\"p\">:]</span> <span class=\"n\">y1_view</span> <span class=\"o\">=</span> <span class=\"n\">y1</span></pre>\n",
       "<pre class='cython code score-4 '>  __pyx_t_10 = <span class='pyx_c_api'>__Pyx_PyObject_to_MemoryviewSlice_ds_float</span>(__pyx_v_y1, PyBUF_WRITABLE);<span class='error_goto'> if (unlikely(!__pyx_t_10.memview)) __PYX_ERR(0, 36, __pyx_L1_error)</span>\n",
       "  __pyx_v_y1_view = __pyx_t_10;\n",
       "  __pyx_t_10.memview = NULL;\n",
       "  __pyx_t_10.data = NULL;\n",
       "/* … */\n",
       "  __pyx_t_10 = <span class='pyx_c_api'>__Pyx_PyObject_to_MemoryviewSlice_ds_double</span>(__pyx_v_y1, PyBUF_WRITABLE);<span class='error_goto'> if (unlikely(!__pyx_t_10.memview)) __PYX_ERR(0, 36, __pyx_L1_error)</span>\n",
       "  __pyx_v_y1_view = __pyx_t_10;\n",
       "  __pyx_t_10.memview = NULL;\n",
       "  __pyx_t_10.data = NULL;\n",
       "</pre><pre class=\"cython line score-4\" onclick=\"(function(s){s.display=s.display==='block'?'none':'block'})(this.nextElementSibling.style)\">+<span class=\"\">37</span>:     <span class=\"k\">cdef</span> <span class=\"kt\">scalar_t</span>[<span class=\"p\">:]</span> <span class=\"n\">x2_view</span> <span class=\"o\">=</span> <span class=\"n\">x2</span></pre>\n",
       "<pre class='cython code score-4 '>  __pyx_t_10 = <span class='pyx_c_api'>__Pyx_PyObject_to_MemoryviewSlice_ds_float</span>(__pyx_v_x2, PyBUF_WRITABLE);<span class='error_goto'> if (unlikely(!__pyx_t_10.memview)) __PYX_ERR(0, 37, __pyx_L1_error)</span>\n",
       "  __pyx_v_x2_view = __pyx_t_10;\n",
       "  __pyx_t_10.memview = NULL;\n",
       "  __pyx_t_10.data = NULL;\n",
       "/* … */\n",
       "  __pyx_t_10 = <span class='pyx_c_api'>__Pyx_PyObject_to_MemoryviewSlice_ds_double</span>(__pyx_v_x2, PyBUF_WRITABLE);<span class='error_goto'> if (unlikely(!__pyx_t_10.memview)) __PYX_ERR(0, 37, __pyx_L1_error)</span>\n",
       "  __pyx_v_x2_view = __pyx_t_10;\n",
       "  __pyx_t_10.memview = NULL;\n",
       "  __pyx_t_10.data = NULL;\n",
       "</pre><pre class=\"cython line score-4\" onclick=\"(function(s){s.display=s.display==='block'?'none':'block'})(this.nextElementSibling.style)\">+<span class=\"\">38</span>:     <span class=\"k\">cdef</span> <span class=\"kt\">scalar_t</span>[<span class=\"p\">:]</span> <span class=\"n\">y2_view</span> <span class=\"o\">=</span> <span class=\"n\">y2</span></pre>\n",
       "<pre class='cython code score-4 '>  __pyx_t_10 = <span class='pyx_c_api'>__Pyx_PyObject_to_MemoryviewSlice_ds_float</span>(__pyx_v_y2, PyBUF_WRITABLE);<span class='error_goto'> if (unlikely(!__pyx_t_10.memview)) __PYX_ERR(0, 38, __pyx_L1_error)</span>\n",
       "  __pyx_v_y2_view = __pyx_t_10;\n",
       "  __pyx_t_10.memview = NULL;\n",
       "  __pyx_t_10.data = NULL;\n",
       "/* … */\n",
       "  __pyx_t_10 = <span class='pyx_c_api'>__Pyx_PyObject_to_MemoryviewSlice_ds_double</span>(__pyx_v_y2, PyBUF_WRITABLE);<span class='error_goto'> if (unlikely(!__pyx_t_10.memview)) __PYX_ERR(0, 38, __pyx_L1_error)</span>\n",
       "  __pyx_v_y2_view = __pyx_t_10;\n",
       "  __pyx_t_10.memview = NULL;\n",
       "  __pyx_t_10.data = NULL;\n",
       "</pre><pre class=\"cython line score-0\">&#xA0;<span class=\"\">39</span>: </pre>\n",
       "<pre class=\"cython line score-0\" onclick=\"(function(s){s.display=s.display==='block'?'none':'block'})(this.nextElementSibling.style)\">+<span class=\"\">40</span>:     <span class=\"k\">for</span> <span class=\"n\">_i</span> <span class=\"ow\">in</span> <span class=\"nb\">range</span><span class=\"p\">(</span><span class=\"n\">ndets</span><span class=\"p\">):</span></pre>\n",
       "<pre class='cython code score-0 '>  __pyx_t_11 = __pyx_v_ndets;\n",
       "  __pyx_t_12 = __pyx_t_11;\n",
       "  for (__pyx_t_13 = 0; __pyx_t_13 &lt; __pyx_t_12; __pyx_t_13+=1) {\n",
       "    __pyx_v__i = __pyx_t_13;\n",
       "/* … */\n",
       "  __pyx_t_11 = __pyx_v_ndets;\n",
       "  __pyx_t_12 = __pyx_t_11;\n",
       "  for (__pyx_t_13 = 0; __pyx_t_13 &lt; __pyx_t_12; __pyx_t_13+=1) {\n",
       "    __pyx_v__i = __pyx_t_13;\n",
       "</pre><pre class=\"cython line score-0\" onclick=\"(function(s){s.display=s.display==='block'?'none':'block'})(this.nextElementSibling.style)\">+<span class=\"\">41</span>:         <span class=\"n\">i</span> <span class=\"o\">=</span> <span class=\"n\">order_view</span><span class=\"p\">[</span><span class=\"n\">_i</span><span class=\"p\">]</span></pre>\n",
       "<pre class='cython code score-0 '>    __pyx_t_14 = __pyx_v__i;\n",
       "    __pyx_v_i = (*((long *) ( /* dim=0 */ (__pyx_v_order_view.data + __pyx_t_14 * __pyx_v_order_view.strides[0]) )));\n",
       "/* … */\n",
       "    __pyx_t_14 = __pyx_v__i;\n",
       "    __pyx_v_i = (*((long *) ( /* dim=0 */ (__pyx_v_order_view.data + __pyx_t_14 * __pyx_v_order_view.strides[0]) )));\n",
       "</pre><pre class=\"cython line score-0\" onclick=\"(function(s){s.display=s.display==='block'?'none':'block'})(this.nextElementSibling.style)\">+<span class=\"\">42</span>:         <span class=\"k\">if</span> <span class=\"n\">suppressed_view</span><span class=\"p\">[</span><span class=\"n\">i</span><span class=\"p\">]</span> <span class=\"o\">==</span> <span class=\"mf\">1</span><span class=\"p\">:</span></pre>\n",
       "<pre class='cython code score-0 '>    __pyx_t_15 = __pyx_v_i;\n",
       "    __pyx_t_1 = (((*((long *) ( /* dim=0 */ ((char *) (((long *) __pyx_v_suppressed_view.data) + __pyx_t_15)) ))) == 1) != 0);\n",
       "    if (__pyx_t_1) {\n",
       "/* … */\n",
       "    }\n",
       "/* … */\n",
       "    __pyx_t_15 = __pyx_v_i;\n",
       "    __pyx_t_1 = (((*((long *) ( /* dim=0 */ ((char *) (((long *) __pyx_v_suppressed_view.data) + __pyx_t_15)) ))) == 1) != 0);\n",
       "    if (__pyx_t_1) {\n",
       "/* … */\n",
       "    }\n",
       "</pre><pre class=\"cython line score-0\" onclick=\"(function(s){s.display=s.display==='block'?'none':'block'})(this.nextElementSibling.style)\">+<span class=\"\">43</span>:             <span class=\"k\">continue</span></pre>\n",
       "<pre class='cython code score-0 '>      goto __pyx_L4_continue;\n",
       "/* … */\n",
       "      goto __pyx_L4_continue;\n",
       "</pre><pre class=\"cython line score-0\" onclick=\"(function(s){s.display=s.display==='block'?'none':'block'})(this.nextElementSibling.style)\">+<span class=\"\">44</span>:         <span class=\"n\">ix1</span> <span class=\"o\">=</span> <span class=\"n\">x1_view</span><span class=\"p\">[</span><span class=\"n\">i</span><span class=\"p\">]</span></pre>\n",
       "<pre class='cython code score-0 '>    __pyx_t_16 = __pyx_v_i;\n",
       "    __pyx_v_ix1 = (*((float *) ( /* dim=0 */ (__pyx_v_x1_view.data + __pyx_t_16 * __pyx_v_x1_view.strides[0]) )));\n",
       "/* … */\n",
       "    __pyx_t_16 = __pyx_v_i;\n",
       "    __pyx_v_ix1 = (*((double *) ( /* dim=0 */ (__pyx_v_x1_view.data + __pyx_t_16 * __pyx_v_x1_view.strides[0]) )));\n",
       "</pre><pre class=\"cython line score-0\" onclick=\"(function(s){s.display=s.display==='block'?'none':'block'})(this.nextElementSibling.style)\">+<span class=\"\">45</span>:         <span class=\"n\">iy1</span> <span class=\"o\">=</span> <span class=\"n\">y1_view</span><span class=\"p\">[</span><span class=\"n\">i</span><span class=\"p\">]</span></pre>\n",
       "<pre class='cython code score-0 '>    __pyx_t_17 = __pyx_v_i;\n",
       "    __pyx_v_iy1 = (*((float *) ( /* dim=0 */ (__pyx_v_y1_view.data + __pyx_t_17 * __pyx_v_y1_view.strides[0]) )));\n",
       "/* … */\n",
       "    __pyx_t_17 = __pyx_v_i;\n",
       "    __pyx_v_iy1 = (*((double *) ( /* dim=0 */ (__pyx_v_y1_view.data + __pyx_t_17 * __pyx_v_y1_view.strides[0]) )));\n",
       "</pre><pre class=\"cython line score-0\" onclick=\"(function(s){s.display=s.display==='block'?'none':'block'})(this.nextElementSibling.style)\">+<span class=\"\">46</span>:         <span class=\"n\">ix2</span> <span class=\"o\">=</span> <span class=\"n\">x2_view</span><span class=\"p\">[</span><span class=\"n\">i</span><span class=\"p\">]</span></pre>\n",
       "<pre class='cython code score-0 '>    __pyx_t_18 = __pyx_v_i;\n",
       "    __pyx_v_ix2 = (*((float *) ( /* dim=0 */ (__pyx_v_x2_view.data + __pyx_t_18 * __pyx_v_x2_view.strides[0]) )));\n",
       "/* … */\n",
       "    __pyx_t_18 = __pyx_v_i;\n",
       "    __pyx_v_ix2 = (*((double *) ( /* dim=0 */ (__pyx_v_x2_view.data + __pyx_t_18 * __pyx_v_x2_view.strides[0]) )));\n",
       "</pre><pre class=\"cython line score-0\" onclick=\"(function(s){s.display=s.display==='block'?'none':'block'})(this.nextElementSibling.style)\">+<span class=\"\">47</span>:         <span class=\"n\">iy2</span> <span class=\"o\">=</span> <span class=\"n\">y2_view</span><span class=\"p\">[</span><span class=\"n\">i</span><span class=\"p\">]</span></pre>\n",
       "<pre class='cython code score-0 '>    __pyx_t_19 = __pyx_v_i;\n",
       "    __pyx_v_iy2 = (*((float *) ( /* dim=0 */ (__pyx_v_y2_view.data + __pyx_t_19 * __pyx_v_y2_view.strides[0]) )));\n",
       "/* … */\n",
       "    __pyx_t_19 = __pyx_v_i;\n",
       "    __pyx_v_iy2 = (*((double *) ( /* dim=0 */ (__pyx_v_y2_view.data + __pyx_t_19 * __pyx_v_y2_view.strides[0]) )));\n",
       "</pre><pre class=\"cython line score-0\" onclick=\"(function(s){s.display=s.display==='block'?'none':'block'})(this.nextElementSibling.style)\">+<span class=\"\">48</span>:         <span class=\"n\">iarea</span> <span class=\"o\">=</span> <span class=\"n\">areas_view</span><span class=\"p\">[</span><span class=\"n\">i</span><span class=\"p\">]</span></pre>\n",
       "<pre class='cython code score-0 '>    __pyx_t_20 = __pyx_v_i;\n",
       "    __pyx_v_iarea = (*((float *) ( /* dim=0 */ ((char *) (((float *) __pyx_v_areas_view.data) + __pyx_t_20)) )));\n",
       "/* … */\n",
       "    __pyx_t_20 = __pyx_v_i;\n",
       "    __pyx_v_iarea = (*((double *) ( /* dim=0 */ ((char *) (((double *) __pyx_v_areas_view.data) + __pyx_t_20)) )));\n",
       "</pre><pre class=\"cython line score-0\" onclick=\"(function(s){s.display=s.display==='block'?'none':'block'})(this.nextElementSibling.style)\">+<span class=\"\">49</span>:         <span class=\"k\">for</span> <span class=\"n\">_j</span> <span class=\"ow\">in</span> <span class=\"nb\">range</span><span class=\"p\">(</span><span class=\"n\">_i</span> <span class=\"o\">+</span> <span class=\"mf\">1</span><span class=\"p\">,</span> <span class=\"n\">ndets</span><span class=\"p\">):</span></pre>\n",
       "<pre class='cython code score-0 '>    __pyx_t_21 = __pyx_v_ndets;\n",
       "    __pyx_t_22 = __pyx_t_21;\n",
       "    for (__pyx_t_23 = (__pyx_v__i + 1); __pyx_t_23 &lt; __pyx_t_22; __pyx_t_23+=1) {\n",
       "      __pyx_v__j = __pyx_t_23;\n",
       "/* … */\n",
       "    __pyx_t_21 = __pyx_v_ndets;\n",
       "    __pyx_t_22 = __pyx_t_21;\n",
       "    for (__pyx_t_23 = (__pyx_v__i + 1); __pyx_t_23 &lt; __pyx_t_22; __pyx_t_23+=1) {\n",
       "      __pyx_v__j = __pyx_t_23;\n",
       "</pre><pre class=\"cython line score-0\" onclick=\"(function(s){s.display=s.display==='block'?'none':'block'})(this.nextElementSibling.style)\">+<span class=\"\">50</span>:             <span class=\"n\">j</span> <span class=\"o\">=</span> <span class=\"n\">order_view</span><span class=\"p\">[</span><span class=\"n\">_j</span><span class=\"p\">]</span></pre>\n",
       "<pre class='cython code score-0 '>      __pyx_t_24 = __pyx_v__j;\n",
       "      __pyx_v_j = (*((long *) ( /* dim=0 */ (__pyx_v_order_view.data + __pyx_t_24 * __pyx_v_order_view.strides[0]) )));\n",
       "/* … */\n",
       "      __pyx_t_24 = __pyx_v__j;\n",
       "      __pyx_v_j = (*((long *) ( /* dim=0 */ (__pyx_v_order_view.data + __pyx_t_24 * __pyx_v_order_view.strides[0]) )));\n",
       "</pre><pre class=\"cython line score-0\" onclick=\"(function(s){s.display=s.display==='block'?'none':'block'})(this.nextElementSibling.style)\">+<span class=\"\">51</span>:             <span class=\"k\">if</span> <span class=\"n\">suppressed_view</span><span class=\"p\">[</span><span class=\"n\">j</span><span class=\"p\">]</span> <span class=\"o\">==</span> <span class=\"mf\">1</span><span class=\"p\">:</span></pre>\n",
       "<pre class='cython code score-0 '>      __pyx_t_25 = __pyx_v_j;\n",
       "      __pyx_t_1 = (((*((long *) ( /* dim=0 */ ((char *) (((long *) __pyx_v_suppressed_view.data) + __pyx_t_25)) ))) == 1) != 0);\n",
       "      if (__pyx_t_1) {\n",
       "/* … */\n",
       "      }\n",
       "/* … */\n",
       "      __pyx_t_25 = __pyx_v_j;\n",
       "      __pyx_t_1 = (((*((long *) ( /* dim=0 */ ((char *) (((long *) __pyx_v_suppressed_view.data) + __pyx_t_25)) ))) == 1) != 0);\n",
       "      if (__pyx_t_1) {\n",
       "/* … */\n",
       "      }\n",
       "</pre><pre class=\"cython line score-0\" onclick=\"(function(s){s.display=s.display==='block'?'none':'block'})(this.nextElementSibling.style)\">+<span class=\"\">52</span>:                 <span class=\"k\">continue</span></pre>\n",
       "<pre class='cython code score-0 '>        goto __pyx_L7_continue;\n",
       "/* … */\n",
       "        goto __pyx_L7_continue;\n",
       "</pre><pre class=\"cython line score-0\" onclick=\"(function(s){s.display=s.display==='block'?'none':'block'})(this.nextElementSibling.style)\">+<span class=\"\">53</span>:             <span class=\"n\">xx1</span> <span class=\"o\">=</span> <span class=\"nb\">max</span><span class=\"p\">(</span><span class=\"n\">ix1</span><span class=\"p\">,</span> <span class=\"n\">x1_view</span><span class=\"p\">[</span><span class=\"n\">j</span><span class=\"p\">])</span></pre>\n",
       "<pre class='cython code score-0 '>      __pyx_t_26 = __pyx_v_j;\n",
       "      __pyx_t_27 = (*((float *) ( /* dim=0 */ (__pyx_v_x1_view.data + __pyx_t_26 * __pyx_v_x1_view.strides[0]) )));\n",
       "      __pyx_t_28 = __pyx_v_ix1;\n",
       "      if (((__pyx_t_27 &gt; __pyx_t_28) != 0)) {\n",
       "        __pyx_t_29 = __pyx_t_27;\n",
       "      } else {\n",
       "        __pyx_t_29 = __pyx_t_28;\n",
       "      }\n",
       "      __pyx_v_xx1 = __pyx_t_29;\n",
       "/* … */\n",
       "      __pyx_t_26 = __pyx_v_j;\n",
       "      __pyx_t_27 = (*((double *) ( /* dim=0 */ (__pyx_v_x1_view.data + __pyx_t_26 * __pyx_v_x1_view.strides[0]) )));\n",
       "      __pyx_t_28 = __pyx_v_ix1;\n",
       "      if (((__pyx_t_27 &gt; __pyx_t_28) != 0)) {\n",
       "        __pyx_t_29 = __pyx_t_27;\n",
       "      } else {\n",
       "        __pyx_t_29 = __pyx_t_28;\n",
       "      }\n",
       "      __pyx_v_xx1 = __pyx_t_29;\n",
       "</pre><pre class=\"cython line score-0\" onclick=\"(function(s){s.display=s.display==='block'?'none':'block'})(this.nextElementSibling.style)\">+<span class=\"\">54</span>:             <span class=\"n\">yy1</span> <span class=\"o\">=</span> <span class=\"nb\">max</span><span class=\"p\">(</span><span class=\"n\">iy1</span><span class=\"p\">,</span> <span class=\"n\">y1_view</span><span class=\"p\">[</span><span class=\"n\">j</span><span class=\"p\">])</span></pre>\n",
       "<pre class='cython code score-0 '>      __pyx_t_30 = __pyx_v_j;\n",
       "      __pyx_t_29 = (*((float *) ( /* dim=0 */ (__pyx_v_y1_view.data + __pyx_t_30 * __pyx_v_y1_view.strides[0]) )));\n",
       "      __pyx_t_27 = __pyx_v_iy1;\n",
       "      if (((__pyx_t_29 &gt; __pyx_t_27) != 0)) {\n",
       "        __pyx_t_28 = __pyx_t_29;\n",
       "      } else {\n",
       "        __pyx_t_28 = __pyx_t_27;\n",
       "      }\n",
       "      __pyx_v_yy1 = __pyx_t_28;\n",
       "/* … */\n",
       "      __pyx_t_30 = __pyx_v_j;\n",
       "      __pyx_t_29 = (*((double *) ( /* dim=0 */ (__pyx_v_y1_view.data + __pyx_t_30 * __pyx_v_y1_view.strides[0]) )));\n",
       "      __pyx_t_27 = __pyx_v_iy1;\n",
       "      if (((__pyx_t_29 &gt; __pyx_t_27) != 0)) {\n",
       "        __pyx_t_28 = __pyx_t_29;\n",
       "      } else {\n",
       "        __pyx_t_28 = __pyx_t_27;\n",
       "      }\n",
       "      __pyx_v_yy1 = __pyx_t_28;\n",
       "</pre><pre class=\"cython line score-0\" onclick=\"(function(s){s.display=s.display==='block'?'none':'block'})(this.nextElementSibling.style)\">+<span class=\"\">55</span>:             <span class=\"n\">xx2</span> <span class=\"o\">=</span> <span class=\"nb\">min</span><span class=\"p\">(</span><span class=\"n\">ix2</span><span class=\"p\">,</span> <span class=\"n\">x2_view</span><span class=\"p\">[</span><span class=\"n\">j</span><span class=\"p\">])</span></pre>\n",
       "<pre class='cython code score-0 '>      __pyx_t_31 = __pyx_v_j;\n",
       "      __pyx_t_28 = (*((float *) ( /* dim=0 */ (__pyx_v_x2_view.data + __pyx_t_31 * __pyx_v_x2_view.strides[0]) )));\n",
       "      __pyx_t_29 = __pyx_v_ix2;\n",
       "      if (((__pyx_t_28 &lt; __pyx_t_29) != 0)) {\n",
       "        __pyx_t_27 = __pyx_t_28;\n",
       "      } else {\n",
       "        __pyx_t_27 = __pyx_t_29;\n",
       "      }\n",
       "      __pyx_v_xx2 = __pyx_t_27;\n",
       "/* … */\n",
       "      __pyx_t_31 = __pyx_v_j;\n",
       "      __pyx_t_28 = (*((double *) ( /* dim=0 */ (__pyx_v_x2_view.data + __pyx_t_31 * __pyx_v_x2_view.strides[0]) )));\n",
       "      __pyx_t_29 = __pyx_v_ix2;\n",
       "      if (((__pyx_t_28 &lt; __pyx_t_29) != 0)) {\n",
       "        __pyx_t_27 = __pyx_t_28;\n",
       "      } else {\n",
       "        __pyx_t_27 = __pyx_t_29;\n",
       "      }\n",
       "      __pyx_v_xx2 = __pyx_t_27;\n",
       "</pre><pre class=\"cython line score-0\" onclick=\"(function(s){s.display=s.display==='block'?'none':'block'})(this.nextElementSibling.style)\">+<span class=\"\">56</span>:             <span class=\"n\">yy2</span> <span class=\"o\">=</span> <span class=\"nb\">min</span><span class=\"p\">(</span><span class=\"n\">iy2</span><span class=\"p\">,</span> <span class=\"n\">y2_view</span><span class=\"p\">[</span><span class=\"n\">j</span><span class=\"p\">])</span></pre>\n",
       "<pre class='cython code score-0 '>      __pyx_t_32 = __pyx_v_j;\n",
       "      __pyx_t_27 = (*((float *) ( /* dim=0 */ (__pyx_v_y2_view.data + __pyx_t_32 * __pyx_v_y2_view.strides[0]) )));\n",
       "      __pyx_t_28 = __pyx_v_iy2;\n",
       "      if (((__pyx_t_27 &lt; __pyx_t_28) != 0)) {\n",
       "        __pyx_t_29 = __pyx_t_27;\n",
       "      } else {\n",
       "        __pyx_t_29 = __pyx_t_28;\n",
       "      }\n",
       "      __pyx_v_yy2 = __pyx_t_29;\n",
       "/* … */\n",
       "      __pyx_t_32 = __pyx_v_j;\n",
       "      __pyx_t_27 = (*((double *) ( /* dim=0 */ (__pyx_v_y2_view.data + __pyx_t_32 * __pyx_v_y2_view.strides[0]) )));\n",
       "      __pyx_t_28 = __pyx_v_iy2;\n",
       "      if (((__pyx_t_27 &lt; __pyx_t_28) != 0)) {\n",
       "        __pyx_t_29 = __pyx_t_27;\n",
       "      } else {\n",
       "        __pyx_t_29 = __pyx_t_28;\n",
       "      }\n",
       "      __pyx_v_yy2 = __pyx_t_29;\n",
       "</pre><pre class=\"cython line score-0\" onclick=\"(function(s){s.display=s.display==='block'?'none':'block'})(this.nextElementSibling.style)\">+<span class=\"\">57</span>:             <span class=\"n\">w</span> <span class=\"o\">=</span> <span class=\"nb\">max</span><span class=\"p\">(</span><span class=\"mf\">0.0</span><span class=\"p\">,</span> <span class=\"n\">xx2</span> <span class=\"o\">-</span> <span class=\"n\">xx1</span> <span class=\"o\">+</span> <span class=\"mf\">1</span><span class=\"p\">)</span></pre>\n",
       "<pre class='cython code score-0 '>      __pyx_t_29 = ((__pyx_v_xx2 - __pyx_v_xx1) + 1.0);\n",
       "      __pyx_t_33 = 0.0;\n",
       "      if (((__pyx_t_29 &gt; __pyx_t_33) != 0)) {\n",
       "        __pyx_t_34 = __pyx_t_29;\n",
       "      } else {\n",
       "        __pyx_t_34 = __pyx_t_33;\n",
       "      }\n",
       "      __pyx_v_w = __pyx_t_34;\n",
       "/* … */\n",
       "      __pyx_t_29 = ((__pyx_v_xx2 - __pyx_v_xx1) + 1.0);\n",
       "      __pyx_t_27 = 0.0;\n",
       "      if (((__pyx_t_29 &gt; __pyx_t_27) != 0)) {\n",
       "        __pyx_t_28 = __pyx_t_29;\n",
       "      } else {\n",
       "        __pyx_t_28 = __pyx_t_27;\n",
       "      }\n",
       "      __pyx_v_w = __pyx_t_28;\n",
       "</pre><pre class=\"cython line score-0\" onclick=\"(function(s){s.display=s.display==='block'?'none':'block'})(this.nextElementSibling.style)\">+<span class=\"\">58</span>:             <span class=\"n\">h</span> <span class=\"o\">=</span> <span class=\"nb\">max</span><span class=\"p\">(</span><span class=\"mf\">0.0</span><span class=\"p\">,</span> <span class=\"n\">yy2</span> <span class=\"o\">-</span> <span class=\"n\">yy1</span> <span class=\"o\">+</span> <span class=\"mf\">1</span><span class=\"p\">)</span></pre>\n",
       "<pre class='cython code score-0 '>      __pyx_t_29 = ((__pyx_v_yy2 - __pyx_v_yy1) + 1.0);\n",
       "      __pyx_t_34 = 0.0;\n",
       "      if (((__pyx_t_29 &gt; __pyx_t_34) != 0)) {\n",
       "        __pyx_t_33 = __pyx_t_29;\n",
       "      } else {\n",
       "        __pyx_t_33 = __pyx_t_34;\n",
       "      }\n",
       "      __pyx_v_h = __pyx_t_33;\n",
       "/* … */\n",
       "      __pyx_t_28 = ((__pyx_v_yy2 - __pyx_v_yy1) + 1.0);\n",
       "      __pyx_t_29 = 0.0;\n",
       "      if (((__pyx_t_28 &gt; __pyx_t_29) != 0)) {\n",
       "        __pyx_t_27 = __pyx_t_28;\n",
       "      } else {\n",
       "        __pyx_t_27 = __pyx_t_29;\n",
       "      }\n",
       "      __pyx_v_h = __pyx_t_27;\n",
       "</pre><pre class=\"cython line score-0\" onclick=\"(function(s){s.display=s.display==='block'?'none':'block'})(this.nextElementSibling.style)\">+<span class=\"\">59</span>:             <span class=\"n\">inter</span> <span class=\"o\">=</span> <span class=\"n\">w</span> <span class=\"o\">*</span> <span class=\"n\">h</span></pre>\n",
       "<pre class='cython code score-0 '>      __pyx_v_inter = (__pyx_v_w * __pyx_v_h);\n",
       "/* … */\n",
       "      __pyx_v_inter = (__pyx_v_w * __pyx_v_h);\n",
       "</pre><pre class=\"cython line score-0\" onclick=\"(function(s){s.display=s.display==='block'?'none':'block'})(this.nextElementSibling.style)\">+<span class=\"\">60</span>:             <span class=\"n\">ovr</span> <span class=\"o\">=</span> <span class=\"n\">inter</span> <span class=\"o\">/</span> <span class=\"p\">(</span><span class=\"n\">iarea</span> <span class=\"o\">+</span> <span class=\"n\">areas_view</span><span class=\"p\">[</span><span class=\"n\">j</span><span class=\"p\">]</span> <span class=\"o\">-</span> <span class=\"n\">inter</span><span class=\"p\">)</span></pre>\n",
       "<pre class='cython code score-0 '>      __pyx_t_35 = __pyx_v_j;\n",
       "      __pyx_v_ovr = (__pyx_v_inter / ((__pyx_v_iarea + (*((float *) ( /* dim=0 */ ((char *) (((float *) __pyx_v_areas_view.data) + __pyx_t_35)) )))) - __pyx_v_inter));\n",
       "/* … */\n",
       "      __pyx_t_33 = __pyx_v_j;\n",
       "      __pyx_v_ovr = (__pyx_v_inter / ((__pyx_v_iarea + (*((double *) ( /* dim=0 */ ((char *) (((double *) __pyx_v_areas_view.data) + __pyx_t_33)) )))) - __pyx_v_inter));\n",
       "</pre><pre class=\"cython line score-0\" onclick=\"(function(s){s.display=s.display==='block'?'none':'block'})(this.nextElementSibling.style)\">+<span class=\"\">61</span>:             <span class=\"k\">if</span> <span class=\"n\">ovr</span> <span class=\"o\">&gt;=</span> <span class=\"n\">thresh</span><span class=\"p\">:</span></pre>\n",
       "<pre class='cython code score-0 '>      __pyx_t_1 = ((__pyx_v_ovr &gt;= __pyx_v_thresh) != 0);\n",
       "      if (__pyx_t_1) {\n",
       "/* … */\n",
       "      }\n",
       "      __pyx_L7_continue:;\n",
       "    }\n",
       "    __pyx_L4_continue:;\n",
       "  }\n",
       "/* … */\n",
       "      __pyx_t_1 = ((__pyx_v_ovr &gt;= __pyx_v_thresh) != 0);\n",
       "      if (__pyx_t_1) {\n",
       "/* … */\n",
       "      }\n",
       "      __pyx_L7_continue:;\n",
       "    }\n",
       "    __pyx_L4_continue:;\n",
       "  }\n",
       "</pre><pre class=\"cython line score-0\" onclick=\"(function(s){s.display=s.display==='block'?'none':'block'})(this.nextElementSibling.style)\">+<span class=\"\">62</span>:                 <span class=\"n\">suppressed_view</span><span class=\"p\">[</span><span class=\"n\">j</span><span class=\"p\">]</span> <span class=\"o\">=</span> <span class=\"mf\">1</span></pre>\n",
       "<pre class='cython code score-0 '>        __pyx_t_36 = __pyx_v_j;\n",
       "        *((long *) ( /* dim=0 */ ((char *) (((long *) __pyx_v_suppressed_view.data) + __pyx_t_36)) )) = 1;\n",
       "/* … */\n",
       "        __pyx_t_34 = __pyx_v_j;\n",
       "        *((long *) ( /* dim=0 */ ((char *) (((long *) __pyx_v_suppressed_view.data) + __pyx_t_34)) )) = 1;\n",
       "</pre><pre class=\"cython line score-0\">&#xA0;<span class=\"\">63</span>: </pre>\n",
       "<pre class=\"cython line score-52\" onclick=\"(function(s){s.display=s.display==='block'?'none':'block'})(this.nextElementSibling.style)\">+<span class=\"\">64</span>:     <span class=\"k\">return</span> <span class=\"n\">np</span><span class=\"o\">.</span><span class=\"n\">where</span><span class=\"p\">(</span><span class=\"n\">suppressed</span> <span class=\"o\">==</span> <span class=\"mf\">0</span><span class=\"p\">)[</span><span class=\"mf\">0</span><span class=\"p\">]</span></pre>\n",
       "<pre class='cython code score-52 '>  <span class='pyx_macro_api'>__Pyx_XDECREF</span>(__pyx_r);\n",
       "  <span class='pyx_c_api'>__Pyx_GetModuleGlobalName</span>(__pyx_t_4, __pyx_n_s_np);<span class='error_goto'> if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 64, __pyx_L1_error)</span>\n",
       "  <span class='refnanny'>__Pyx_GOTREF</span>(__pyx_t_4);\n",
       "  __pyx_t_3 = <span class='pyx_c_api'>__Pyx_PyObject_GetAttrStr</span>(__pyx_t_4, __pyx_n_s_where);<span class='error_goto'> if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 64, __pyx_L1_error)</span>\n",
       "  <span class='refnanny'>__Pyx_GOTREF</span>(__pyx_t_3);\n",
       "  <span class='pyx_macro_api'>__Pyx_DECREF</span>(__pyx_t_4); __pyx_t_4 = 0;\n",
       "  __pyx_t_4 = <span class='pyx_c_api'>__Pyx_PyInt_EqObjC</span>(__pyx_v_suppressed, __pyx_int_0, 0, 0);<span class='error_goto'> if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 64, __pyx_L1_error)</span>\n",
       "  <span class='refnanny'>__Pyx_GOTREF</span>(__pyx_t_4);\n",
       "  __pyx_t_2 = NULL;\n",
       "  if (CYTHON_UNPACK_METHODS &amp;&amp; unlikely(<span class='py_c_api'>PyMethod_Check</span>(__pyx_t_3))) {\n",
       "    __pyx_t_2 = <span class='py_macro_api'>PyMethod_GET_SELF</span>(__pyx_t_3);\n",
       "    if (likely(__pyx_t_2)) {\n",
       "      PyObject* function = <span class='py_macro_api'>PyMethod_GET_FUNCTION</span>(__pyx_t_3);\n",
       "      <span class='pyx_macro_api'>__Pyx_INCREF</span>(__pyx_t_2);\n",
       "      <span class='pyx_macro_api'>__Pyx_INCREF</span>(function);\n",
       "      <span class='pyx_macro_api'>__Pyx_DECREF_SET</span>(__pyx_t_3, function);\n",
       "    }\n",
       "  }\n",
       "  __pyx_t_8 = (__pyx_t_2) ? __Pyx_PyObject_Call2Args(__pyx_t_3, __pyx_t_2, __pyx_t_4) : <span class='pyx_c_api'>__Pyx_PyObject_CallOneArg</span>(__pyx_t_3, __pyx_t_4);\n",
       "  <span class='pyx_macro_api'>__Pyx_XDECREF</span>(__pyx_t_2); __pyx_t_2 = 0;\n",
       "  <span class='pyx_macro_api'>__Pyx_DECREF</span>(__pyx_t_4); __pyx_t_4 = 0;\n",
       "  if (unlikely(!__pyx_t_8)) <span class='error_goto'>__PYX_ERR(0, 64, __pyx_L1_error)</span>\n",
       "  <span class='refnanny'>__Pyx_GOTREF</span>(__pyx_t_8);\n",
       "  <span class='pyx_macro_api'>__Pyx_DECREF</span>(__pyx_t_3); __pyx_t_3 = 0;\n",
       "  __pyx_t_3 = <span class='pyx_c_api'>__Pyx_GetItemInt</span>(__pyx_t_8, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 0);<span class='error_goto'> if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 64, __pyx_L1_error)</span>\n",
       "  <span class='refnanny'>__Pyx_GOTREF</span>(__pyx_t_3);\n",
       "  <span class='pyx_macro_api'>__Pyx_DECREF</span>(__pyx_t_8); __pyx_t_8 = 0;\n",
       "  __pyx_r = __pyx_t_3;\n",
       "  __pyx_t_3 = 0;\n",
       "  goto __pyx_L0;\n",
       "/* … */\n",
       "  <span class='pyx_macro_api'>__Pyx_XDECREF</span>(__pyx_r);\n",
       "  <span class='pyx_c_api'>__Pyx_GetModuleGlobalName</span>(__pyx_t_4, __pyx_n_s_np);<span class='error_goto'> if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 64, __pyx_L1_error)</span>\n",
       "  <span class='refnanny'>__Pyx_GOTREF</span>(__pyx_t_4);\n",
       "  __pyx_t_3 = <span class='pyx_c_api'>__Pyx_PyObject_GetAttrStr</span>(__pyx_t_4, __pyx_n_s_where);<span class='error_goto'> if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 64, __pyx_L1_error)</span>\n",
       "  <span class='refnanny'>__Pyx_GOTREF</span>(__pyx_t_3);\n",
       "  <span class='pyx_macro_api'>__Pyx_DECREF</span>(__pyx_t_4); __pyx_t_4 = 0;\n",
       "  __pyx_t_4 = <span class='pyx_c_api'>__Pyx_PyInt_EqObjC</span>(__pyx_v_suppressed, __pyx_int_0, 0, 0);<span class='error_goto'> if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 64, __pyx_L1_error)</span>\n",
       "  <span class='refnanny'>__Pyx_GOTREF</span>(__pyx_t_4);\n",
       "  __pyx_t_2 = NULL;\n",
       "  if (CYTHON_UNPACK_METHODS &amp;&amp; unlikely(<span class='py_c_api'>PyMethod_Check</span>(__pyx_t_3))) {\n",
       "    __pyx_t_2 = <span class='py_macro_api'>PyMethod_GET_SELF</span>(__pyx_t_3);\n",
       "    if (likely(__pyx_t_2)) {\n",
       "      PyObject* function = <span class='py_macro_api'>PyMethod_GET_FUNCTION</span>(__pyx_t_3);\n",
       "      <span class='pyx_macro_api'>__Pyx_INCREF</span>(__pyx_t_2);\n",
       "      <span class='pyx_macro_api'>__Pyx_INCREF</span>(function);\n",
       "      <span class='pyx_macro_api'>__Pyx_DECREF_SET</span>(__pyx_t_3, function);\n",
       "    }\n",
       "  }\n",
       "  __pyx_t_8 = (__pyx_t_2) ? __Pyx_PyObject_Call2Args(__pyx_t_3, __pyx_t_2, __pyx_t_4) : <span class='pyx_c_api'>__Pyx_PyObject_CallOneArg</span>(__pyx_t_3, __pyx_t_4);\n",
       "  <span class='pyx_macro_api'>__Pyx_XDECREF</span>(__pyx_t_2); __pyx_t_2 = 0;\n",
       "  <span class='pyx_macro_api'>__Pyx_DECREF</span>(__pyx_t_4); __pyx_t_4 = 0;\n",
       "  if (unlikely(!__pyx_t_8)) <span class='error_goto'>__PYX_ERR(0, 64, __pyx_L1_error)</span>\n",
       "  <span class='refnanny'>__Pyx_GOTREF</span>(__pyx_t_8);\n",
       "  <span class='pyx_macro_api'>__Pyx_DECREF</span>(__pyx_t_3); __pyx_t_3 = 0;\n",
       "  __pyx_t_3 = <span class='pyx_c_api'>__Pyx_GetItemInt</span>(__pyx_t_8, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 0);<span class='error_goto'> if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 64, __pyx_L1_error)</span>\n",
       "  <span class='refnanny'>__Pyx_GOTREF</span>(__pyx_t_3);\n",
       "  <span class='pyx_macro_api'>__Pyx_DECREF</span>(__pyx_t_8); __pyx_t_8 = 0;\n",
       "  __pyx_r = __pyx_t_3;\n",
       "  __pyx_t_3 = 0;\n",
       "  goto __pyx_L0;\n",
       "</pre></div></body></html>"
      ],
      "text/plain": [
       "<IPython.core.display.HTML object>"
      ]
     },
     "execution_count": 25,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "%%cython -a\n",
    "\n",
    "cimport numpy as np\n",
    "import numpy as np\n",
    "cimport cython\n",
    "\n",
    "ctypedef fused scalar_t:\n",
    "    float\n",
    "    double\n",
    "\n",
    "@cython.boundscheck(False)\n",
    "@cython.wraparound(False)\n",
    "@cython.cdivision(True)\n",
    "def nms_cpu(np.ndarray[scalar_t, ndim=2] dets, scalar_t thresh):\n",
    "    \n",
    "    if dets.shape[0] == 0:\n",
    "        return []\n",
    "    scores = dets[:, 0]\n",
    "    x1 = dets[:, 1]\n",
    "    y1 = dets[:, 2]\n",
    "    x2 = dets[:, 3]\n",
    "    y2 = dets[:, 4]\n",
    "\n",
    "    areas = (x2 - x1 + 1) * (y2 - y1 + 1)\n",
    "    cdef scalar_t[::1] areas_view = areas\n",
    "    order = scores.argsort()[::-1]\n",
    "    cdef long[::] order_view = order\n",
    "\n",
    "    ndets = dets.shape[0]\n",
    "    suppressed = np.zeros((ndets), dtype=np.long)\n",
    "    cdef long[::1] suppressed_view = suppressed\n",
    "\n",
    "    cdef scalar_t ix1, iy1, ix2, iy2, iarea, xx1, yy1, xx2, yy2, w, h, inter, ovr\n",
    "    cdef Py_ssize_t _i, _j, i, j\n",
    "    \n",
    "    cdef scalar_t[:] x1_view = x1\n",
    "    cdef scalar_t[:] y1_view = y1\n",
    "    cdef scalar_t[:] x2_view = x2\n",
    "    cdef scalar_t[:] y2_view = y2\n",
    "    \n",
    "    for _i in range(ndets):\n",
    "        i = order_view[_i]\n",
    "        if suppressed_view[i] == 1:\n",
    "            continue\n",
    "        ix1 = x1_view[i]\n",
    "        iy1 = y1_view[i]\n",
    "        ix2 = x2_view[i]\n",
    "        iy2 = y2_view[i]\n",
    "        iarea = areas_view[i]\n",
    "        for _j in range(_i + 1, ndets):\n",
    "            j = order_view[_j]\n",
    "            if suppressed_view[j] == 1:\n",
    "                continue\n",
    "            xx1 = max(ix1, x1_view[j])\n",
    "            yy1 = max(iy1, y1_view[j])\n",
    "            xx2 = min(ix2, x2_view[j])\n",
    "            yy2 = min(iy2, y2_view[j])\n",
    "            w = max(0.0, xx2 - xx1 + 1)\n",
    "            h = max(0.0, yy2 - yy1 + 1)\n",
    "            inter = w * h\n",
    "            ovr = inter / (iarea + areas_view[j] - inter)\n",
    "            if ovr >= thresh:\n",
    "                suppressed_view[j] = 1\n",
    "\n",
    "    return np.where(suppressed == 0)[0]"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 29,
   "metadata": {},
   "outputs": [],
   "source": [
    "import numpy as np\n",
    "\n",
    "def nms(dets, thresh):\n",
    "    if dets.shape[0] == 0:\n",
    "        return []\n",
    "    scores = dets[:, 0]\n",
    "    x1 = dets[:, 1]\n",
    "    y1 = dets[:, 2]\n",
    "    x2 = dets[:, 3]\n",
    "    y2 = dets[:, 4]\n",
    "\n",
    "    areas = (x2 - x1 + 1) * (y2 - y1 + 1)\n",
    "    order = scores.argsort()[::-1]\n",
    "\n",
    "    ndets = dets.shape[0]\n",
    "    suppressed = np.zeros((ndets), dtype=np.int)\n",
    "\n",
    "    for _i in range(ndets):\n",
    "        i = order[_i]\n",
    "        if suppressed[i] == 1:\n",
    "            continue\n",
    "        ix1 = x1[i]\n",
    "        iy1 = y1[i]\n",
    "        ix2 = x2[i]\n",
    "        iy2 = y2[i]\n",
    "        iarea = areas[i]\n",
    "        for _j in range(_i + 1, ndets):\n",
    "            j = order[_j]\n",
    "            if suppressed[j] == 1:\n",
    "                continue\n",
    "            xx1 = max(ix1, x1[j])\n",
    "            yy1 = max(iy1, y1[j])\n",
    "            xx2 = min(ix2, x2[j])\n",
    "            yy2 = min(iy2, y2[j])\n",
    "            w = max(0.0, xx2 - xx1 + 1)\n",
    "            h = max(0.0, yy2 - yy1 + 1)\n",
    "            inter = w * h\n",
    "            ovr = inter / (iarea + areas[j] - inter)\n",
    "            if ovr >= thresh:\n",
    "                suppressed[j] = 1\n",
    "\n",
    "    return np.where(suppressed == 0)[0]\n",
    "\n",
    "\n",
    "def generate_bboxes(n, width=160, height=90):\n",
    "    xy = np.random.rand(n, 2)\n",
    "    wh = np.random.rand(n, 2)\n",
    "    x1y1 = np.clip(xy - wh / 2, 0, 1)\n",
    "    x2y2 = np.clip(xy + wh / 2, 0, 1)\n",
    "    bboxes = np.concatenate([x1y1, x2y2], axis=1)\n",
    "    bboxes *= [width, height, width, height]\n",
    "    return bboxes\n",
    "\n",
    "bboxes = generate_bboxes(10000)\n",
    "scores = np.random.rand(10000)\n",
    "dets = np.concatenate([scores[:, None], bboxes], axis=1)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 30,
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "14.8 s ± 1.22 s per loop (mean ± std. dev. of 7 runs, 1 loop each)\n"
     ]
    }
   ],
   "source": [
    "%timeit nms(dets, 0.5)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 31,
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "42.3 ms ± 347 µs per loop (mean ± std. dev. of 7 runs, 10 loops each)\n"
     ]
    }
   ],
   "source": [
    "%timeit nms_cpu(dets, 0.5)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 32,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "True"
      ]
     },
     "execution_count": 32,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "np.all(nms(dets, 0.5) == nms_cpu(dets, 0.5))"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {},
   "outputs": [],
   "source": []
  }
 ],
 "metadata": {
  "kernelspec": {
   "display_name": "Python 3",
   "language": "python",
   "name": "python3"
  },
  "language_info": {
   "codemirror_mode": {
    "name": "ipython",
    "version": 3
   },
   "file_extension": ".py",
   "mimetype": "text/x-python",
   "name": "python",
   "nbconvert_exporter": "python",
   "pygments_lexer": "ipython3",
   "version": "3.7.4"
  }
 },
 "nbformat": 4,
 "nbformat_minor": 4
}
